Starting December 3, join live sessions with database experts and the Microsoft product team to learn just how easy it is to get started
Learn moreGet certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now
Hi all!
i use this DAX
Solved! Go to Solution.
Hi @RT6
Thanks for the reply from @Dangar332 , please allow me to provide another insight:
My sample:
Create a measure as follows
comparison =
VAR _previous = CALCULATE(SUM(Market[Sales]), FILTER(Market, [Date] IN SAMEPERIODLASTYEAR('Calendar'[Date])))
VAR _current = CALCULATE(SUM(Market[Sales]), FILTER(ALL(Market), [Date] IN VALUES('Calendar'[Date])))
RETURN
DIVIDE(_previous + _current, 1000)
Result:
Best Regards,
Yulia Xu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @RT6
Thanks for the reply from @Dangar332 , please allow me to provide another insight:
My sample:
Create a measure as follows
comparison =
VAR _previous = CALCULATE(SUM(Market[Sales]), FILTER(Market, [Date] IN SAMEPERIODLASTYEAR('Calendar'[Date])))
VAR _current = CALCULATE(SUM(Market[Sales]), FILTER(ALL(Market), [Date] IN VALUES('Calendar'[Date])))
RETURN
DIVIDE(_previous + _current, 1000)
Result:
Best Regards,
Yulia Xu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
hi Yulia,
thanks for your response! SAMEPERIODLASTYEAR worked well in this case 🙂
Hi, @RT6
you have slicer in month form and you want sum of month wise then use DATESYTD()
use DATESYTD instead of DATESMTD
Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.
User | Count |
---|---|
23 | |
21 | |
20 | |
14 | |
11 |
User | Count |
---|---|
43 | |
33 | |
25 | |
24 | |
23 |