Forum Discussion
sumitnegi1266
3 years agoFrequent Visitor
How to insert rows in Power BI Matrix to show minimum and maximum values
Hi, I have below data and need to display extra rows showing minimum and maximum for each set. I am also using company slicer, so if company A and Company B are selected, it should show minimum and ...
- 3 years ago
try this
https://1drv.ms/u/s!AiUZ0Ws7G26Rijc76j-np9aWnkBQ?e=UqwSfU
Final = VAR _min = CALCULATE ( MIN ( 'Table'[Value] ), ALLSELECTED('Table'[Set] ) ) VAR _max = CALCULATE ( MAX ( 'Table'[Value] ), ALLSELECTED('Table'[Set] ) ) RETURN SWITCH ( TRUE (), SELECTEDVALUE ( DimCompany[Company] ) = "Minimum", _min, SELECTEDVALUE ( DimCompany[Company] ) = "Maximum", _max, CALCULATE ( [Sales], TREATAS ( VALUES ( DimCompany[Company] ), 'Table'[Company] ) ) )
sumitnegi1266
3 years agoFrequent Visitor
Thank you so much Ahmedx, it works as expected now 🙂