Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!View all the Fabric Data Days sessions on demand. View schedule
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
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 17 | |
| 11 | |
| 9 | |
| 5 | |
| 4 |
| User | Count |
|---|---|
| 31 | |
| 25 | |
| 21 | |
| 14 | |
| 12 |