Total orders in three weeks for a customer that was new three weeks ago.

I need help figuring out the MDX to use to calculate this measure: Total orders in three weeks for customers that were new three weeks ago.   I seem to be having a brain freeze or over thinking this as usual. 
My records have a customer, a date, a flag=1 if they are new that order.  So I have a customer dimension a date dimension and four measures: Unique_customer, date, New_customer(the Flag), Orders. 
So the fact table would look something like this:
Date        Cust_Key       New_Flag      Order     
1/5/10      801                                     1           
1/5/10      802                  1                  1
1/5/10      803                                     1
1/6/10       801                                    
1
1/6/10      804                   1                  1
1/6/10       803                                     
1
1/6/10       802                                      1
1/7/10       801                                       1
1/7/10        802                                     
1
1/7/10       804                                       
1
And for simplicity, using days instead of weeks -
Customer 802 has a new flag 3 days ago and on report date 1/7/10 and has three orders, one per day. So my new measure should show 3
Customer 804 wouldn't show up until report date 1/8/10 and Customer 802 would drop off.
So I need to know how many times, to the current report week, did a customer who was new in LAG(3) place orders. 
Diane Blackwood

Thing will be easy if you have New_customer_Flag in customer dimension. The New_customer_Flag
should be 1 for all those customers who were new three weeks back.
Assuming that the measure you have is Count_Of_Order, MDX would be
Select [Measures].[Count_of_order] on Columns,
[Customer_Dim].[Customer].Members on Rows
From 
(Select ([Date_Dim].[Week].&[201001].Lag(3): [Date_Dim].[Week].&[201001])
on Columns
From [OrderCube])
Where ([Customer_Dim].[New_customer_Flag].&[1]);
Saurabh Kamath

Similar Messages

  • MRP, need to split total order in three week

    Hi SAP GURU,
    i need to split total order in three weeks. how i can make setting so that after MRP execution system will create proposals like 1st week302nd week 303rd week 40
    Thanks,
    SAP PQ

    Dear
    Goto MD61-Enter Material -Goto User Parameters -Select Weekly (W) -Enter Weekly bucket qty in case u have PIR as your demand
    In case if you have Sales Order oriented qty then you can use Scheduling agreement kind of forecasting in VA31  instea of MD61  or Yo can try Period Lot Size WB in Material master and logging Sales Order qty .
    Check both cases in sandbox and look at MD04 result
    regards
    JH

  • I ordered cards 1 week ago through iPhoto and I have not yet received a shipping confirmation.  How do I know when/if the cards will be processed and shipped? Thank you.

    I ordered cards 1 week ago through iPhoto and I have not yet received a shipping confirmation.  How do I know when/if the cards will be processed and shipped? Thank you.

    go to the online apple store (store.apple.com) and check your account for order status
    LN

  • Verizon is charging my account for a service that was not provided.

    Verizon is charging my account for a service that was not provided.
    I am a LONG term Verizon customer and no one is helping.....
    I work in IT, with the Network and Mobility groups, so I know what I am talking about, network access, O/S, bandwidth, etc….
    I changed to a droid Bionic, from my LG (broken).   I started experiencing issues with inability to connect to a solid 4G network. The phone was not updated to Ice Cream Sandwich O/S and tried repeatedly to get update, but no go. Verizon did swap out with another bionic, but still experienced issues with inability to consistently get network access.  I work in a big city, no one else was having issues at my work.
    Husband left for Europe due to a family emergency mid Sept.   FIL was in hospital.  I work and there is a 7 hour time difference.   We both had SKYPE on our phones.  At work, I tried to contact him, using SKYPE.   SKYPE would not connect, due to the phone issue connecting to the network.   I had to call husband directly (international calls) to get updates on the condition of my ill, 96 yo FIL.  
    1.   This was not an issue of an app that did not function and that Verizon does not support.   I did not have access to the network, thus could not use SKYPE to make calls.  This was not a choice to call international.  
    Verizon admitted that it was a phone issue.  Since I am a long term Verizon customer and have insurance on the phone, they tried to give me yet another Bionic 9that would not work).  After much discussion, they sent me a RAZR that was on the updated O/S.
    Up to the 29th of Sept, I was on the Bionic and could not access SKYPE.  Once I transferred over, I could use SKYPE and was not forced by Verizon to make international calls due the lack of network service that I pay for EACH MONTH.
    When I received my bill for Sept, there were hundreds of dollars of additional charges.  
    This was due to the international calling that I was forced to use to check on status of terminally ill 96 yo FIL.
    This was due to the overage of minutes that I had and was never notified of by Verizon, due to the interational calls.
    I have tried to deal with Verizon on eliminating the charges. This is after having to deal with the death and funeral arrangements, service, etc of FIL.  Verizon claims that I made the calls, thus I must pay.   They admitted to it being a Verizon network issue when they traded for the Razr and updated O/S, but still want me to pay hundreds of dollars in extra fees that THEY CAUSED.

    szilasi wrote:
    Just as a FYI..  Husband was at the hospital, not at a PC. It would be so sanitary and easy if all was scheduled properly, but guess what?  Usually when someone is ill enough and has been rushed to the hospital and extended stay, you do not only contact at 6 AM in the morning.   You check on statuses, talk to doctors, etc. during the day. 
    I thought you said YOUR phone was the one having the problem, not his. You could have Skyped/emailed from a computer TO his phone, but you chose to call instead.
    Yes, you are correct, everyone does not always think clearly when in a stressful situation such as that. Does not mean someone else should pay for YOUR actions.
    Another thing I notice about your prior post is you say "Verizon claims that I made the calls, thus I must pay." but you also claim to have made the calls yourself, so it isn't necessarily that Verizon "claims" you made the calls, you DID make the calls.
    Finally, I have found myself in a similar situation in the past and most likely in the near future. I also didn't(and don't) expect Verizon to pay for my phone usage during those times.

  • RemoveChild for movie clip that was added in another function?

    Hello everyone.  I have 3 different functions for my preloader.  I have an Event.OPEN, ProgressEvent.PROGRESS, and an Event.COMPLETE.  In the event.OPEN function, I create a new variable that is data typed to the class name of my preloader that I set in it's property dialogue box.  This is just a simple circle animation.  Below is my code for it:
    function addPreloader(event:Event):void
        var myPreloader:mcPreloader = new mcPreloader();
        myPreloader.x = stage.stageWidth / 2;
        myPreloader.y = stage.stageHeight / 2;
        myPreloader.width = 75;
        myPreloader.height = 75;
        addChild(myPreloader);
    My ProgressEvent.PROGRESS function looks like so:
    function preloadImages(event:ProgressEvent):void
        var percent:Number = Math.round(event.bytesLoaded / event.bytesTotal * 100);
        percent_txt.text = percent + "%";
    and my Event.COMPLETE function looks like so:
    function imageLoaded(event:Event):void
        var myLoadedImage:Loader = Loader(event.target.loader);
        addChild(myLoadedImage);
        new Tween(myLoadedImage, "alpha", Strong.easeIn, 0, 1, 0.5, true);
        event.target.loader.removeEventListener(Event.OPEN, addPreloader);
        event.target.loader.removeEventListener(ProgressEvent.PROGRESS, preloadImages);
        event.target.loader.removeEventListener(Event.COMPLETE, imageLoaded);
    The only problem is that when it's done loading, I'd like to remove the myPreloader from the stage.  Since it is declared in the Event.OPEN function, I can't communicate with it via my Event.COMPLETE function.  How can I successfully remove it from the stage after it's done loading?  Thanks!
    Jesse

    Duh, thanks Kglad.  It's been a long week ;).
    Jesse
    Date: Thu, 9 Jun 2011 13:47:57 -0600
    From: [email protected]
    To: [email protected]
    Subject: removeChild for movie clip that was added in another function?
    var myPreloader:mcPreloader
    function addPreloader(event:Event):void
       myPreloader = new mcPreloader();
        myPreloader.x = stage.stageWidth / 2;
        myPreloader.y = stage.stageHeight / 2;
        myPreloader.width = 75;
        myPreloader.height = 75;
        addChild(myPreloader);
    My ProgressEvent.PROGRESS function looks like so:
    function preloadImages(event:ProgressEvent):void
        var percent:Number = Math.round(event.bytesLoaded / event.bytesTotal * 100);
        percent_txt.text = percent + "%";
    and my Event.COMPLETE function looks like so:
    function imageLoaded(event:Event):void
    removeChild(myPreloader);
    myPreloader=null;
        var myLoadedImage:Loader = Loader(event.target.loader);
        addChild(myLoadedImage);
        new Tween(myLoadedImage, "alpha", Strong.easeIn, 0, 1, 0.5, true);
        event.target.loader.removeEventListener(Event.OPEN, addPreloader);
        event.target.loader.removeEventListener(ProgressEvent.PROGRESS, preloadImages);
        event.target.loader.removeEventListener(Event.COMPLETE, imageLoaded);
    >

  • I refuse to pay for a one year automatic subscription for Cosumer report that was charged to my account today without me noticing. How can I cancel that and get reimbursed now?

    I refuse to pay for a one year automatic subscription for Cosumer report that was charged to my account today without me noticing. How can I cancel that and get reimbursed now?
    Patrick

    First turn off auto-renewing subscriptions:
    iTunes Store: Purchasing and managing auto-renewing subscriptions
    Getting a refund won't be as simple. For that you will have to contact iTunes Store Support.

  • TS1424 I was charged for an App that was presented as being free.Has this happened to anyone else?

    I was charged for an App that was presented as being free.Has this happened to anyone else and what did you do?

    You were charged for downloading it (some apps allow you to make in-app purchases within them to unlock extra features) ?
    If when downloading it then does a purchase price show on your purchase history : if you log into your account on your computer's iTunes via the Store > View Account menu option, you should then see a Purchase History section with a 'see all' link to the right of it. Click on that and you should then see a list of your purchases (the most recent purchase is above the list).
    Of did you add or change your credit card details on your iTunes account when downloading the app ? If you have then each time that you do so a small temporary store holding charge may be applied to check that the card details are correct and valid and that it's registered to exactly the same name and address as on your iTunes account - it should disappear off your account within a few days or so.
    Store holding charge : http://support.apple.com/kb/HT3702
    If you have been charged when you shouldn't have then you can try contacting iTunes Support via this page : http://www.apple.com/support/itunes/contact/ - click on Contact iTunes Store Support on the right-hand side of the page, then Purchases, Billing & Redemption

  • I have money in my account, and i wanted to purchase gems from a game ( the tribez) but it keeps showing me this message ........." this item is for an appliction that was purchased by a different apple id. to buy this item, with this apple id you must pu

    i have money in my account, and i wanted to purchase gems from a game ( the tribez) but it keeps showing me this message ........." this item is for an appliction that was purchased by a different apple id. to buy this item, with this apple id you must purchase the application. i dont understand the problem and how to pix it, please i need help.

    thanks kiltedTim its working your right it appears as they same game and now i can purchased and buy and item using my new apple id thanks a lot your a great help, Oppps i have one more questioned on it you have any idea how to changed a country regioned that still have a store credit balanced of point .23$ i want to changed it into the japanes store that which i have and itunes card, 

  • HT3702 was a mistake that I tried to download it my baby that I can do for my account that the new works oh when can I remove it from my account

    was a mistake that I tried to download it my baby that I can do for my account that the new works oh when can I remove it from my account

    Not sure what you are asking - what did you download and what do you want to remove ? If you purchased something that you didn't mean to then all purchases are considered final, but you can try contacting iTunes support and see if they will refund or credit you : http://www.apple.com/support/itunes/contact/ - click on Contact iTunes Store Support on the right-hand side of the page, then Purchases, Billing & Redemption
    If you mean something else ... ?

  • HT5622 I am trying to buy some help on the "candy crush" game but I keep getting this pop-up" unable to purchase. This item is for an app that was purchased by a different Apple ID. to buy this item with this Apple ID you must first purchase the app. My d

    I am trying to buy help on my candy crush game but I keep getting this pop-up? Unable to Purchase. This item for an app that was purchased by a different Apple ID. To buy this item with this Apple ID, you must first purchase the app. My daughter set up this game on my Iphone. I am on level 65 and don't wont to start over if I don't have to.
    Any suggestions?

    If it was indeed purchased with a different apple ID then there is no work around for what you want! You can try signing in with your daughter's apple ID and password and update the app and purchase whatever you want then log back in with your apple ID. This may work!

  • How do I get a refund for an item that was purchased in error on the ipad by my 5 year old?

    How do I get a refund for an item that was purchased on the ipad in error by my 5 year old?

    All sales are final.
    You can try contacting itunes support and asking for an exception
    http://www.apple.com/support/contact/

  • Where 2 download the 19gb of content for MainStage 3 that was jam packs?

    hello, where  do i download the 19gb of content for mainstage 3  that was in the jam packs?
    Just got mainstage 3 and need the content.
    hope nothing has changed in this regard.

    Open Mainstage 3 and select Mainstage 3 in the menu at the top of the screen. Select downlaod additional caontent. Jam Packs are in the Legacy folder. Select the box for Legacy and Compatibility and install. That should do it.

  • TS1424 i paid for a game that was over 50mb while not in a wi-fi area and the game never downloaded, what do i do?

    I paid for a game that was over 50mb while not in a wi-fi area and the game never downloaded, what do i do?
    The name of the game was "Zuma's Revenge!" It cost $1.99.

    Welcome to the Apple Community.
    You can re-download content purchased from the app store using the purchased option from the Quick Links section in the top right corner of the iTunes homepage in your iTunes application on your computer.
    You can re-download content purchased from the app store using the purchased option which is revealed by tapping the updates option at the bottom of the screen of the App store app on your iOS device.
    If the problem re-occurs, select the content which is causing a problem and use the 'Report a problem' button in Your Purchase History using your computer.

  • HT1420 When trying to buy gems (I have $50 credit) in "Clash of Clans" game I get: "Unable to Purchase.  This item is for an app that was purchased by a different Apple ID.  To buy this item with this Apple ID first purchase the app?  Which app?

    When trying to buy gems on the "Clash of Clans" game I get the following:
    "Unable to Purchase.  This item is for an app that was purchased by a different Apple ID.  To buy this item with this Apple ID, you must first purchase the App."
    I redeemed the itunes voucher on the same Apple ID I want to buy the gems with? 
    What do I do from here.

    You will only be able to buy items in an app if you are signed into and use the same account that you originally bought that app with - is that the account that you are signed into ?

  • HT5691 Why can't I purchase applecare support for my iphone5 that was bought from ATT?

    Why can't I purchase applecare support for my iphone5 that was bought from ATT?

    not online like I usually do.
    when I enter the serial number, it shows standard warranty with no option to purchase exended applecare+

Maybe you are looking for

  • Classification of Purchase Info Records

    Hi , Not sure if anyone can help me here - I've searched hi and low, but here goes.... Is it possible to add classification to a Purchase Info Record? Essentially info records will be created by a custom procedure and have a series of "normal" fields

  • Saving a book as PDF takes significantly more time when the file binary *.fm rater than *.mif?

    Is it possible, that saving a book (with FrameMaker 10) as PDF takes significantly more time when the file is formatted in the binary *.fm rather than the *.mif format? We have books (+160p) that take about 20 min to be saved as PDF, whereas the same

  • Any way to change picture timezones?

    Hi, I'm cleaning an older Aperture library and I've discovered a number of pictures that are listed with the incorrect timezone. Is there any way to change this after the files are already imported? To clarify: Aperture seems to store (in its own met

  • Split Totals on ALV Grid

    Hi all, When displaying totals in a column of an ALV Grid (objects methodology) my totals are split. For example, if I have 5 rows with values in the column being summed of 100, 20, 300, 40 and 500; I end up with 3 total lines at the end of the list

  • Browser?

    Hi every body, I want to display result of my application programme on the html form in browser. I do not want to use the servlet. If there is any class that support to display the result on browser please tell me. Can I call the browser in my applic