Pages

Calculate Max of multiple measures in Power BI

In this post I'll show you how to calculate the maximum of multiple measures in Power BI.

First you need to create the several measures or variable within a measures. 
Measure1 = Sum ( ProductA[Stock] )
Measure2 = Sum ( ProductB[Stock] )
Measure3 = ...

After all your measures are created, create a new one which will contain a list of all measures that you want to evaluate
Measure = 
VAR _List =  List { Measure1, Measure2, Measure3,... }
RETURN
MAXX ( _List, [Value] )

This will return the Max value from all measures included in the _List variable.

No comments:

Post a Comment