Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
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
User | Count |
---|---|
25 | |
12 | |
8 | |
6 | |
6 |
User | Count |
---|---|
26 | |
12 | |
11 | |
9 | |
6 |