Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Hi,
I am looking for a way to sum last 3 month sales. The trick is to add up from the first day of the month three years ago to selected day.
Is there a better way to write this measure? it seems not really great (but works).
Last 3 calendar month sale =
CALCULATE (
SUM ( Sales[TurnoverinUnit] );
DATESBETWEEN (
'Date'[Date];
STARTOFMONTH(DATEADD( 'Date'[Date]; -3; MONTH ));
MAX ( 'Date'[Date] )
)
)
Thanks!
@Anonymous
why dont you like it? 🙂 easy and light enough from my point of view
Oh just I thought there will be a better way (e.g. using a prebuilt DAX formula) to manage it.
But if not, I will accept its fate.
User | Count |
---|---|
58 | |
21 | |
18 | |
16 | |
13 |
User | Count |
---|---|
85 | |
54 | |
45 | |
39 | |
21 |