Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now
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 maximum as per the data filtered in Power BI matrix.
My Data:
Expected Output:
Solved! Go to Solution.
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] )
)
)
@AhmedxThanks for sharing the pbix. The only issue with this is, when I select companies under Set 1, it should give the minimum and maximum from those selected companies. In the screenshot below, the minimum for Set 1 should be 10. Also, the min and max should appear only once.
@Ahmedx It is still showing incorrect results. For company A and Company B selected, the maximum should be 30, but it is currently showing 50.
everything shows correctly

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] )
)
)
Based on your description, I created data to reproduce your scenario. The pbix file is attached in the end.
https://1drv.ms/u/s!AiUZ0Ws7G26RijYWQyfB8iSBT4ef?e=XiaJWg
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
Check out the February 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 53 | |
| 48 | |
| 35 | |
| 14 | |
| 14 |
| User | Count |
|---|---|
| 93 | |
| 79 | |
| 37 | |
| 27 | |
| 25 |