Forum Discussion
Casteless
Helper I
9 years agoTrying to calculate most recent classification
Suppose there are three columns: CLIENT | Classification | Date 1 | A | 1/1/2016 1 | A | 1/1/2016 1 | B | 2/...
Casteless
Helper I
9 years agoWell 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
Vvelarde
Community Champion
9 years ago
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])))