Forum Discussion
Trying to calculate most recent classification
Can you have different classification in same day for a client?
Using your sample Data i have this result
Well this is odd, are you sure you copied in the duplicate dates?
I am also using the sample data and I recieve the multiple values error.
the measure:
class2 = CALCULATE(VALUES(Testtable[class]),LASTDATE(Testtable[date]))
the data: Testtable
- Casteless9 years ago
Helper I
Ah the problem was in the "totals" option again, why must that be turned to off for this to work?
- Vvelarde9 years ago
Community Champion
To solve the error you can put the Table's Total OFF.
The error appears because in totals, you have 2 or more rows with last date (Example: 4/1/16). If you don't want to switch off the totals you need to add to dax formula:
Class2 = IF(HasOneValue(Testtable[client]),CALCULATE(VALUES(Testtable[class]),LASTDATE(Testtable[date])))