Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

TOTALYTD - erroneous calculation

I've found an oddity using TOTALYTD.   I've set up a measure Sales YTD = Calculate(TOTALYTD(SUM(Sales[Sale£]),Sales[OrderDate]))   And used it in a table:   I've checked the Sales YTD aga...
  • parry2k's avatar
    7 years ago

    Anonymous for time intelligence calculations like TOTALYTD , it is best practice to add date dimension in your data model. THere are many blogs on how to add date/calendar dimension in your data model. After you have date dimension, set relationship on date between date and sales table and change your measure to use Date from new dimension instead of OrderDate