Forum Discussion
Max by category
- 4 years ago
Nethergate , You need to add an index column in the power query and then try this DAX new column
var _min = minx(filter(Table, [Country] =earlier([Country]) && [Cost Center] =earlier([cost Center]) && [Month] =earlier([Month])), [Index])
var _max = maxx(filter(Table, [Country] =earlier([Country]) && [Cost Center] =earlier([cost Center]) && [Month] =earlier([Month])), [headcount])
return
if([Index] =_min, _max, blank())
Nethergate , Is headcount is measure or column ?
It's a column
- amitchandak4 years agoSuper User
Nethergate , You need to add an index column in the power query and then try this DAX new column
var _min = minx(filter(Table, [Country] =earlier([Country]) && [Cost Center] =earlier([cost Center]) && [Month] =earlier([Month])), [Index])
var _max = maxx(filter(Table, [Country] =earlier([Country]) && [Cost Center] =earlier([cost Center]) && [Month] =earlier([Month])), [headcount])
return
if([Index] =_min, _max, blank())