DAX calculating prior year sales on "lost sales"

cr731

Well-known Member
Joined
Sep 17, 2010
Messages
611
I have a data model with a Sales fact file and Date table and am trying to calculate, for each customer by month, what are the last year sales where the customer has been lost? Lost is defined as where there has been no sale for 3 months past the last order date.

So my formula is

Code:
=
CALCULATE (
    CALCULATE ( SUM ( Sales[Net Revenue] ), SAMEPERIODLASTYEAR ( 'Date'[Period] ) ),
    FILTER (
        Sales,
        MIN ( 'Date'[Period] )
            > CALCULATE ( EDATE ( MAX ( Sales[Period] ), 3 ), ALL ( 'Date' ) )
    )
)

But this just gives me blank for everything. Not sure what the issue is?
 

Excel Facts

Repeat Last Command
Pressing F4 adds dollar signs when editing a formula. When not editing, F4 repeats last command.
Thanks; I have read and reviewed that page... however I could not figure out how to modify the formulas to return prior year sales on lost sales. My Sales table is also simpler than what is in that model because my dates are only by-month - i.e. 1/1/2015, 2/1/2015, not specific dates throughout the month.
 
Upvote 0

Forum statistics

Threads
1,215,009
Messages
6,122,674
Members
449,091
Latest member
peppernaut

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top