Pawel Osipowski
Pawel Osipowski

Reputation: 544

DAX Calc. Column with true/false entry only in latest instance per category

I would need the fourth, calculated column, to the below ex. table. Category is 'case' and entry is in the latest 'date' record per category, based on the 'result' from the latest 'date'

enter image description here

Thanks!

Upvotes: 1

Views: 260

Answers (1)

davidebacci
davidebacci

Reputation: 30304

final result = 

 VAR tbl = CALCULATETABLE('Table', ALLEXCEPT('Table', 'Table'[case]))
 VAR maxDate = MAXX(tbl, 'Table'[date])

 RETURN 
 IF('Table'[date] = maxDate,
    CONCATENATEX( 
        FILTER(tbl,  'Table'[date] = maxDate), 'Table'[result]
    ), ""
)

enter image description here

Upvotes: 1

Related Questions