Forum Discussion
DAX TOTALYTD() - Duplicate Date Error
- 10 years ago
Actually there are duplicate values in your table..( same date in multiple rows )..plus you are using time intelligent functions TOTALYTD which in DAX need a seperate date table/dimention.
So you need to create a date table ( one row for every date ) and relate that to SampleSheet[Date].
Then your formula will be YTD = TOTALYTD(SUM(SampleSheet[Value]), Datetable[Date])
There are 3 at least ways to create - add a date table such as load it from an external source, create one in PQ with M language, create one in data model with DAX functions CALENDAR() or CALENDARAUTO()...A simple search in community or Google it will guide you for all solutions.
Actually there are duplicate values in your table..( same date in multiple rows )..plus you are using time intelligent functions TOTALYTD which in DAX need a seperate date table/dimention.
So you need to create a date table ( one row for every date ) and relate that to SampleSheet[Date].
Then your formula will be YTD = TOTALYTD(SUM(SampleSheet[Value]), Datetable[Date])
There are 3 at least ways to create - add a date table such as load it from an external source, create one in PQ with M language, create one in data model with DAX functions CALENDAR() or CALENDARAUTO()...A simple search in community or Google it will guide you for all solutions.