Want to create analysis for this year week vs last year week

All,
My requirement is to create an analysis for the passed week number of this year vs same last year week no.
So basically user will pass the week no. and report should display the passed week no. this year sales number plus same week no. last year sales number.
How can I achieve this?
Thanks

If you ask like this ..I would say like using presentation variable for week
use measure with exp like
CASE WHEN WEEK=@{WK} AND Time.year=VALUEOF("PREVIOUS_YEAR") THEN #sales END.
In this case week is from your subject area and PREVIOUS_YEAR is rep variable you might have it.
there are other options to get output, need details about your rpd and value of week.

Similar Messages

  • Two or more productid will be accquired by same customerid, by same shipvia, on the same day of the week of shipped date. i want the simple query for this.

    consider this situation,
     Two or more productid will be accquired by same customerid, by same shipvia, on the same  day of the week of shipped date. i want the simple query for this.
    my tables are  from northwind:
    [orders] = OrderID, CustomerID, EmployeeID, OrderDate, RequiredDate, ShippedDate, ShipVia, Freight, ShipName, ShipAddress, ShipCity, ShipRegion, ShipPostalCode, ShipCountry.
    [orders details] = OrderID, ProductID, UnitPrice, Quantity, Discount.
    i tried some but it is not exact, it gives wrong result.
    select pd.CustomerID,pd.ProductID, pd.no_of_time_purchased, sd.ShipVia, sd.same_ship_count, shipped_day from
    select ProductID,o.CustomerID,COUNT(productid) as no_of_time_purchased
    from orders o join [Order Details] od on o.OrderID=od.OrderID group by ProductID,o.CustomerID
    having count(od.ProductID) >1) pd
    join
    (select OrderID,customerid, shipvia, count(shipvia)as same_ship_count, DATENAME(DW,ShippedDate)as shipped_day from orders
    group by customerid, ShipVia, ShippedDate having COUNT(ShipVia) > 1 ) sd
    on sd.CustomerID=pd.CustomerID

    Hi,
    I think I have a solution that will at least give you a clue how to go about it. I have simplified the tables you mentioned and created them as temporary tables on my side, with some fake data to test with. I have incldued the generation of these temporary
    tables for your review.
    In my example I have included:
    1. A customer which has purchased the same product on the same day, using the same ship 3 times,
    2. Another example the same as the first but the third purchase was on a different day
    3. Another example the same as the first but the third purchase was a different product
    4. Another example the same as the first but the third purchase was using a different "ShipVia".
    You should be able to see that by grouping on all of the columns that you wich to return, you should not need to perform any subselects.
    Please let me know if I have missed any requirements.
    Hope this helps:
    CREATE TABLE #ORDERS
     OrderID INT,
     CustomerID INT,
     OrderDate DATETIME,
     ShipVia VARCHAR(5)
    CREATE TABLE #ORDERS_DETAILS
     OrderID INT,
     ProductID INT,
    INSERT INTO #ORDERS
    VALUES
    (1, 1, GETDATE(), 'ABC'),
    (2, 1, GETDATE(), 'ABC'),
    (3, 1, GETDATE(), 'ABC'),
    (4, 2, GETDATE() - 4, 'DEF'),
    (5, 2, GETDATE() - 4, 'DEF'),
    (6, 2, GETDATE() - 5, 'DEF'),
    (7, 3, GETDATE() - 10, 'GHI'),
    (8, 3, GETDATE() - 10, 'GHI'),
    (9, 3, GETDATE() - 10, 'GHI'),
    (10, 4, GETDATE() - 10, 'JKL'),
    (11, 4, GETDATE() - 10, 'JKL'),
    (12, 4, GETDATE() - 10, 'MNO')
    INSERT INTO #ORDERS_DETAILS
    VALUES
    (1, 1),
    (2, 1),
    (3, 1),
    (4, 2),
    (5, 2),
    (6, 2),
    (7, 3),
    (8, 3),
    (9, 4),
    (10, 5),
    (11, 5),
    (12, 5)
    SELECT * FROM #ORDERS
    SELECT * FROM #ORDERS_DETAILS
    SELECT
     O.CustomerID,
     OD.ProductID,
     O.ShipVia,
     COUNT(O.ShipVia),
     DATENAME(DW, O.OrderDate) AS [Shipped Day]
    FROM #ORDERS O
    JOIN #ORDERS_DETAILS OD ON O.orderID = OD.OrderID
    GROUP BY OD.ProductID, O.CustomerID, O.ShipVia, DATENAME(DW, O.OrderDate) HAVING COUNT(OD.ProductID) > 1
    DROP TABLE #ORDERS
    DROP TABLE #ORDERS_DETAILS

  • I have an existing ipod that I use with my mac. I am trying to connect an additional ipod to it but when I try and register, it just brings up the existing info. I don't want to lose the original info or library - just create new for this device. Pls help

    I have an existing ipod that I use with my mac. I am trying to connect an additional ipod to it but when I try and register, it just brings up the existing info. I don't want to lose the original info or library - just create new for this device. Pls help...

    We are starting from the beginning like its a new ipod starts out asking language, country,location services,choose a network,and when we get to "setup ipod touch  " there are 3 options 1..setup as new ipod, 2.restore from ipod backup 3 restore from itunes backup and when we hit setup as new ipod and click next it comes up with sign in with apple id or create a free apple id  we clicked create a free apple id....then comes up with bday,1st name last name, use your current email address, get a free icloud email address or change email address and THIS is where we have problems....if we hit change email address it means that sis's stuff goes under his name and moves all her stuff to this older ipod which the brother does not want. sorry this is so long but its the only way I knew to do it.

  • I designer I want to create forms for web client, does each client have to purchase form central to access the data?

    I designer I want to create forms for web client, does each client have to purchase form central to access the data?

    Hi,
    In this scenario, you can share the document with the clients to and provide co-author privileges.
    Co-authors can edit the form design, options, responses, and summary report (everything that you can do).
    Note:- They do not require a paid subscription to view the responses, free subscription users can become co-authors.
    Please refer to the following thread to know how to share a form with others:-How do I share a form I created with others?
    Regards,
    Nakul

  • I want to thank Adobe for this new Cloud all apps program.

    Being an artist who is honestly having a heck of a time in this economy and the last year being not so good. I was unable to afford the CS6 production upgrade, not even close to having that much money, times are tough. And I want to thank them for making the cloud (all apps) for $30 a month to us, I could just cry.

    Hi BigZak,
    Thanks sharing glad to hear its working out well for you!
    -Dave

  • HT4970 My reminders app will not want to create reminders for me. What could be the problem, how to fix it? Thanks in advance

    My reminders app will not want to create reminders for me. What could be the problem, how to fix it? Thanks in advance

    Lol idk I updated this iPhone right when I got it because it said there is a new update so I installed it as soon as possible and there is no plus sign over there. I don't know how that happened maybe its something in the setting do you think you know? And when I ask Siri to create me a new reminder and I tell her the time and everything she says are you sure you want to create this reminder I press confirm and then she says I'm sorry but the reminder you are trying to create can not be crated.

  • I want to create stock for particular material in r3 system to check different availabilty checks it triggers

    I want to create stock for particular material in r3 system to check different availabilty checks it triggers like one time delivery ,and delivery proposal (partial delivery) please help me to get these .

    you can use MB1C with movement type 501

  • Help with Jsp: logic:iterate  Cannot create iterator for this collection

    Hello,
    I am developing a jsp with struts. This is the snap of the code:
            <logic:iterate id="prod" collection="productList" >
              <tr align="center">
                   <td><html:text property="prodDesc" size="50" indexed="true"/></td>
                   <td>
                        <html:select property="prodUnit" indexed="true">
                             <option selected>-</option>
                            <OPTION VALUE='NMB'>NMB
                             <OPTION VALUE='TEN'>TEN
                             <OPTION VALUE='TPR'>TPR
                             <OPTION VALUE='GWH'>GWH
                        </html:select>
                   </td>
                   <td><html:text property="prodQty" size="20" indexed="true"/></td>
                   <td><html:text property="prodVal" size="20" indexed="true"/></td>               
              </tr>
            </logic:iterate>"productList" is defined as an array of Product[], "prod" is defined as a single Product object in the form. But when i run the page, it gives me this errors:
    "javax.servlet.jsp.JspException: Cannot create iterator for this collection".
    I also tried to make "productList" an ArrayList type, but it game me this same error.
    We are using Websphere 4.0 with Struts 1.1.
    Anyone can help?
    Thanks a lot.
    All the best,
    warren

    Hi , I have similar problem. wonder anyone can help me. I have a datastructure. ArrayList contains list of Hashtable; each Hashtable has two key-value sets ; for each key-value set , value is a ValueObject.
    My jsp works ok. but when I click on the radio butten for one radio group, it sets not only the porperty on that row, but the rows belows ,which suppose to be another radio group , because I am using indexed="true". each row should be a individual group seperated by the name poDisplayVO[i] , as show in the html generated .
    <!-- JSP -->
    <logic:iterate id="poDisplayVO"
    name="testForm"
    property="poDisplayVOList"
    type="java.util.Hashtable">
    <tr>
    <td>
    <bean:write name="poDisplayVO" property="name"/>
    </td>
    <td>          
    <% String val = ((java.util.Hashtable)poDisplayVO).get("subjAreaName").toString();%>
    <html:radio indexed="true" name="poDisplayVO" property="fosVO.select" value="<%=val %>" />
    <bean:write name="poDisplayVO" property="subjAreaName"/>
    </td>
    <td>           
    <html:radio indexed="true" name="poDisplayVO" property="fosVO.select" value="no" /> NO
    </td>
    <td>           
    <html:radio indexed="true" name="poDisplayVO" property="fosVO.select" value="yes" /> YES
    </td>
    </tr>
    </logic:iterate>
    <! ------------------------ html genterated ------------------------------------------------>
    the HTML generated as folllows:
    <tr>
    <td>
              Accounting Studies
    </td>
    <td>          
         <input type="radio" name="poDisplayVO[0].fosVO.select" value="Accounting">
              Accounting
    </td>
    <td>           
         <input type="radio" name="poDisplayVO[0].fosVO.select" value="no"> NO
    </td>
    <td>           
         <input type="radio" name="poDisplayVO[0].fosVO.select" value="yes"> YES
    </td>
    </tr>
    <tr>
    <td>
              Accounting Studies
    </td>
    <td>          
         <input type="radio" name="poDisplayVO[1].fosVO.select" value="Bookkeeping">
              Bookkeeping
    </td>
    <td>           
         <input type="radio" name="poDisplayVO[1].fosVO.select" value="no"> NO
    </td>
    <td>           
         <input type="radio" name="poDisplayVO[1].fosVO.select" value="yes"> YES
    </td>
    </tr>
    <tr>
    <td>
              Accounting Studies
    </td>
    <td>          
         <input type="radio" name="poDisplayVO[2].fosVO.select" value="Computerized Accounting(Duplicate)">
              Computerized Accounting(Duplicate)
    </td>
    <td>           
    <input type="radio" name="poDisplayVO[2].fosVO.select" value="no"> NO
    </td>
    <td>           
    <input type="radio" name="poDisplayVO[2].fosVO.select" value="yes"> YES
    </td>
    </tr>
    <! ------------------------ action form-----------------------------------------------
    public ArrayList getPoDisplayVOList() {
         return poDisplayVOList;
    public void setPoDisplayVOList(ArrayList list) {
         poDisplayVOList = list;
    public Hashtable getPoDisplayVO(int i) {
         Object obj = poDisplayVOList.get(i);
         if (obj == null)
              obj = new Hashtable();
              poDisplayVOList.add(obj);
         return (Hashtable)poDisplayVOList.get(i);
    public void setPoDisplayVO(Hashtable programDisplayVO, int i) {
              poDisplayVOList.add(i, programDisplayVO);
         }

  • ServletException: Cannot create iterator for this collection

    hi,
    i am using struts action class with struts tags to display
    data in jsp page.
    in struts class i am return arraylist ,
    same list i am displaing in jsp.
    if Arraylist have data ,i am not getting error.
    but if arraylist empty ,i am getting ServletException: Cannot create iterator for this collection
    <logic:iterate id="result" name="fileList" >
    <td><bean:write name="result" property="fileName"/></td>
    </logic:iterate
    can any one help how to avoid this exception?
    thanks
    siav

    You could use <bean:size> to get the size of the list
    and conditionally execute the logic:iterate,
    something like this :
    That will work, but not necessary. If the collection is empty, the iterate tag just skips - it doesnt throw an exception (tested)
    The problem I guess is that the bean with the specified name is not a Collection. It may be a property of the bean that is a collection in which case the tag should have a property attribute.
    ram.

  • I am unable to fully download iPhoto on my iPad 2. It downloads nearly to the end and then I get a message that says"unable to download at this time." This time has now lasted two weeks. What do I do? Many thanks!

    How do I download iPhoto to my iPad 2 iOS 6? It refuses to fully download. Towards the end of the download, I get a message that says "unable to download at this time." This time has now lasted two weeks. I already have iPhoto on my MacBook Pro. Many thanks.

    Have you tried a soft-reset ? Press and hold both the sleep and home buttons for about 10 to 15 seconds (ignore the red slider if it appears), after which the Apple logo should appear - you won't lose any content, it's the iPad equivalent of a reboot.

  • HT1459 I purchase an iPod shuffle for my niece and nephew last year for Christmas.  My nephew's iPod has come up missing and I have reason to believe it was stolen.  I  used my iTunes to put music on it in the beginning can I find the serial number somewh

    I purchased an iPod shuffle for my niece and nephew last year for Christmas.  My nephew's has come up missing and I have strong reason to believe it was stolen.  Amazon cannot give me the serial number and I used my iTunes to put music on it initially.  Is there a place I can find the serial number on my iTunes and can it be tracked to different computers if someone else is using it?  My nephew no longer has the packaging.

    Type "ipod serial number" into the search bar at the top of this page by Support and read the article explaining how to find the serial number.

  • I want to restore a back up from icloud from last year but it has disappeared! can i recover older backups?

    I want to restore a back up from icloud from last year but it has disappeared! can i recover older backups?

    No, once removed, backups cannot be recovered.  Also, Apple will remove backups after 180 days of inactivity, which sounds like what happened here.

  • This problem showed up last year spent 2 months with apple senior supervisor for tech support no solution. When the "new" itunes came out problem fixed its self. Just did an update last week or so and back to the problem. In "get info" missing all rt side

    Last year upon an update some of my itunes media was not working. Then the new version came out and it fixed itself.
    Well another update and we start over with the problem. In the itunes store you can not preview any tv show, music video, or movie.
    In your itunes library none of the purchased movies, tv shows, or music videos play. The element the same is in the get info tab. The information in the right side pane in the middle is gone. The left side information is still present. The right side info is the purchase info. Even an item downloaded today had the missing info and will not play. After dealing with apple support with the first go around last year. I uninstalled and reinstalled itunes 8 or more times, in the proper order. I deleted my itunes library and reinstalled it. We deleted all types of program files and program data. nothing worked. I was trying things on my own and foung nothing. Please help I am so frustrated with this. It seems to be a codec error that I can not solve.

    Your issue has been escalated to a Verizon agent. Before the agent can begin assisting you, they will need to collect further information from you.
    Please go to your profile page for the forum, and look in the middle, right at the top where you will find an area titled "My Support Cases". You can reach your profile page by clicking on your name beside your post, or at the top left of this page underneath the title of the board.
    Under “My Support Cases” you will find a link to the private board where you and the agent may exchange information. This should be checked on a frequent basis as the agent may be waiting for information from you before they can proceed with any actions.
    To ensure you know when they have responded to you, at the top of your support case there is a drop down menu for support case options. Open that and choose "subscribe".
    Please keep all correspondence regarding your issue in the private support portal.

  • I want to create checklist for rpd that tells about best practices

    Hi all,
    i want to create a checklist for rpd..that tells about what are all the best practices that we have to do..
    we have to write some script based on this script only it has to create the checklist.
    Thanks in advance
    Edited by: 988084 on 13/05/2013 02:34

    Hi,
    Pls refer the following link...
    http://www.peakindicators.com/media_pi/Knowledge/25%20-%20twenty%20golden%20rules%20for%20rpd%20design.pdf
    Thanks,
    Jprakash

  • I just want to create music without this hassle! I use to love my Logic set

    REALLY hate to bother you guys! I have been away from my home studio for a bit and have fallen out of the "loop" so to speak. I have a G5 dual 1.8 GHZ with 1.5 GB DDR Ram and I'm running Tiger 10.4.7
    Ok so here's my issue: When I start to record an Audio instrument I have the click track to start a four click lead and I know I start on time, but the first note doesn't play out on play back. Now if the line I play is looped ... the first not plays on the re- up and then after. So I know the note has been captured. Why would this happen? I don't loop all the tracks I play so I'm a bit frustrated about that. So again... I choose an audio instrument. I hit record... wait for the count in and proceed to play on the one. I go back to the beginning of the track to listen back. And the first note played does not sound. Now I see it in notation and when I loop the part. When the loop comes back around the second time the first note sounds? HELP! I want to create music again, but not like this...

    Yes, Logic captured it but will not playback a note that starts before 1.1.1.1
    either slide the start position back to 0.1.1.1 or begin recording on 2.1.1.1.
    Because it was captured, when you loop, the 2nd play of the loop is after 1.1.1.1 so sounds.

Maybe you are looking for

  • Error while validating 0Analysis_Pattern or opening in WAD

    Hi All I am getting an error while validating the template 0Analysis_pattern, the error says "Cannot Instantiate data provider" Message No. RSWADPREXEC023. It is coming as an error message and not a warning. Can somebody help me out ! Thanks

  • Probelm of displaying alv fields in Spool display

    In report using alv grid, i am able to see all columns in normal output displauy but in spool display some last columns are not displaying, so what could be the problem? Edited by: samdup on Apr 9, 2010 1:51 PM

  • Heading texts not appearing correctly in WDA search help

    Hello experts, I am facing a problem in WDA. I have a field(Profile Key) in my WDA application which takes the input search help automatically from the data dictionary. When I execute my application the F4 help is displayed for the field on pressing

  • Mini-vga out for browser video

    How can I direct video from browser windows (when at www.livescorehunter.com) to the external video port? I only know that in VLC you can select external display in the menu.

  • P.O validation

    Hi, i have made user exit program. program logic is as follows. we maintain a 'z' table with material code & WBS element and when ever we create a p.o with account assingment 'q'. it needs to check the 'z' table whether the material code along with w