Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
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 |
---|---|
42 | |
28 | |
23 | |
18 | |
15 |
User | Count |
---|---|
54 | |
35 | |
18 | |
17 | |
15 |