Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
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 |
---|---|
16 | |
14 | |
13 | |
12 | |
11 |
User | Count |
---|---|
19 | |
16 | |
15 | |
11 | |
9 |