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!Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hi,
can anyone help me with DAX.
this is the actual data i have
i need help to create a measure that if user choose the date it will calculate the different of cummulative quantity sold between selected date and previous year. example if user select the december 2022, it will pick 3500 (from november 2022, because december 2022 not available) - 1785 (from december 2021)
another example to make it clear : if user choose august 2022, so it will pick 3150 (from may 2022) - 350 (From march 2021)
totally blank on how to achieve that, i create cummulative using calculated column.
thanks
regards,
Sind
Solved! Go to Solution.
@wsindharta , Are looking for YTD over YTD ?
eith help from date table
YTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESYTD('Date'[Date],"12/31"))
Last YTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESYTD(dateadd('Date'[Date],-1,Year),"12/31"))
diff = [YTD Sales]-[Last YTD Sales]
diff % = divide([YTD Sales]-[Last YTD Sales]],[Last YTD Sales])
Time Intelligence, Part of learn Power BI https://youtu.be/cN8AO3_vmlY?t=27510
Time Intelligence, DATESMTD, DATESQTD, DATESYTD, Week On Week, Week Till Date, Custom Period on Period,
Custom Period till date: https://youtu.be/aU2aKbnHuWs&t=145s
@wsindharta , Are looking for YTD over YTD ?
eith help from date table
YTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESYTD('Date'[Date],"12/31"))
Last YTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESYTD(dateadd('Date'[Date],-1,Year),"12/31"))
diff = [YTD Sales]-[Last YTD Sales]
diff % = divide([YTD Sales]-[Last YTD Sales]],[Last YTD Sales])
Time Intelligence, Part of learn Power BI https://youtu.be/cN8AO3_vmlY?t=27510
Time Intelligence, DATESMTD, DATESQTD, DATESYTD, Week On Week, Week Till Date, Custom Period on Period,
Custom Period till date: https://youtu.be/aU2aKbnHuWs&t=145s
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 |
|---|---|
| 9 | |
| 9 | |
| 8 | |
| 6 | |
| 6 |
| User | Count |
|---|---|
| 24 | |
| 18 | |
| 16 | |
| 15 | |
| 9 |