Forum Discussion
Lucy01
7 months agoHelper I
Create Measure to Return Highest Value
I’m trying to create a measure that returns the highest result out of three options. For example, I want to create a trendline for student attendance and the three options are Above Average, Aver...
- 7 months ago
you can try this
Classwork Max Result =
CALCULATE(
MAX('Sheet1'[Value]),
ALLEXCEPT('Sheet1', 'Sheet1'[Month])
)Classwork Max Category =
VAR tbl =
ADDCOLUMNS(
{
( "Above Average", [Classwork Above Average] ),
( "Average", [Classwork Average] ),
( "Below Average", [Classwork Below Average] )
},
"Category", [Value]
)
VAR MaxVal = MAXX(tbl, [Value])
RETURN
SELECTCOLUMNS(
FILTER(tbl, [Value] = MaxVal),
"Category", [Category]
)Are these three average data measures or columns? It's better to provide some sample data