Forum Discussion
MischaT
3 years agoFrequent Visitor
DATESYTD Issue (Rolling Cumulation)
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 + Sh...
- 3 years ago
Hi,
You can simplyfy the DAX a bit:
IF(isblank([Shops calc]),0,[Shops calc])
Then create a YTD calculation for this measure and just [YTD Apples sold (rolling)]+[Shop Sales (rolling)]. [Since Apple + Shop Sales]] already has YTD calculation within it it isn't necessary to calculate it again for the [YTD Apples sold (rolling)] part.
In short create separate YTD calculations and + these together.
I hope this post helps to solve your issue and if it does consider accepting it as a solution and giving the post a thumbs up!
My LinkedIn: https://www.linkedin.com/in/n%C3%A4ttiahov-00001/
ValtteriN
Community Champion
3 years agoHi,
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.
MischaT
3 years agoFrequent Visitor
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:
1. Shops calc = CALCULATE( SUM(Shop[ShopNum]),Shop[ShopName]="Shop Sales")
and
Shop Sales = IF(
[Shops calc]=BLANK(),
0,
CALCULATE([Shops calc]))
- ValtteriN3 years ago
Community Champion
Hi,
You can simplyfy the DAX a bit:
IF(isblank([Shops calc]),0,[Shops calc])
Then create a YTD calculation for this measure and just [YTD Apples sold (rolling)]+[Shop Sales (rolling)]. [Since Apple + Shop Sales]] already has YTD calculation within it it isn't necessary to calculate it again for the [YTD Apples sold (rolling)] part.
In short create separate YTD calculations and + these together.
I hope this post helps to solve your issue and if it does consider accepting it as a solution and giving the post a thumbs up!
My LinkedIn: https://www.linkedin.com/in/n%C3%A4ttiahov-00001/- MischaT3 years agoFrequent Visitor
Thank you!