cancel
Showing results for
Did you mean:

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Post Prodigy

## how to get a max of a measure?

I have this data:

(last column shall be a sum grouped by BU and UP).

I have achieved the last column SubTotalBU, by doing:

SubTotalBU = CALCULATE ( sum(Sheet1[NSR]), ALLSELECTED(), VALUES(Sheet1[BU]),  VALUES(Sheet1[UP]) )

My goal is to get the max of column SubTotalBU for each UP… That is; I need a column  with all values 90 in this case.

I have tried using MAX of SubTotalBU, but it doesn’t work with measures… How can I get it?

1 ACCEPTED SOLUTION
Community Support

Hi @ovonel ,

Please try to create a measure like below:

``Measure = MAXX(ALL(Sheet1),[SubTotalBU])``

Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

3 REPLIES 3
Post Prodigy

doesn't work (last column below...). I aim to get the max (that is, 90 in every row...)

Community Support

Hi @ovonel ,

Please try to create a measure like below:

``Measure = MAXX(ALL(Sheet1),[SubTotalBU])``

Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Super User

@ovonel , Try a measure like

maxx(addcolumns(summarize(Sheet1, Sheet1[BU],Sheet1[UP]),"_1", calculate(sum(Sheet1[NSR]),filter(allselected(Sheet1),Sheet1[BU] =max(Sheet1[BU]) && Sheet1[UP] =max(Sheet1[UP])))), [_1])

Announcements

#### Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.