Forum Discussion

MischaT's avatar
MischaT
Frequent Visitor
3 years ago
Solved

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...
  • ValtteriN's avatar
    ValtteriN
    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/