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.
H there!
I am having an issue with one of my rolling calculations for the below table:
Number of Apples sold | YTD Apples sold (rolling) | Shop Sales | Apple + Shop Sales | YTD Apple + Shop Sales (Rolling)
(Calculating incorrectly) | Expected outcome | ||
2022 | January | 0 | 0 | 0 | 0 | 0 | 0 |
2022 | February | 0 | 0 | 0 | 0 | 0 | 0 |
2022 | March | 1800 | 1800 | 0 | 1800 | 0 | 1800 |
2022 | April | 0 | 1800 | 23000 | 25050 | 23000 | 26850 |
2022 | May | 81795 | 83845 | 0 | 83845 | 23000 | 110695 |
2022 | June | 0 | 83845 | 95000 | 179095 | 118250 | 289790 |
2022 | July | 4750 | 88845 | 0 | 88845 | 118250 | 378635 |
2022 | August | 0 | 88845 | 104550 | 193645 | 223050 | 572280 |
2022 | September | 0 | 88845 | 26900 | 115995 | 250200 | 688275 |
The current Dax for "YTD Apple + Shop Sales (Rolling)" is
Solved! Go to Solution.
Hi,
You can simplyfy the DAX a bit:
IF(
Proud to be a Super User!
Hi,
What kind of calculation are you using in your [Apple + Shop Sales]? The issue is with DATESYTD interaction with this measure so that dax should be revised.
Proud to be a Super User!
Hello!
Thank you for your response
Please see below:
Apple + Shop Sales = CALCULATE([YTD Apples sold (rolling)]+[Shop Sales])
And Shop sales are calculated by two measures:
Hi,
You can simplyfy the DAX a bit:
IF(
Proud to be a Super User!
Thank you!
User | Count |
---|---|
25 | |
12 | |
8 | |
8 | |
7 |
User | Count |
---|---|
27 | |
13 | |
13 | |
11 | |
6 |