Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
I have a slicer to select a Country, and a table with 3 measures based on this slicer. The three measures are: Average Historical ASP, Average Material Cost, and Margin. I am trying to add a 4th measure which finds the minimum value from all values in the Margin column.
The formula I am currently using is:
I would expect that with all Country values selected, it should show 3.27 as Min Margin for all rows in the above. Where am I going wrong?
Solved! Go to Solution.
@Anonymous Try:
Min Margin =
VAR __Table = SUMMARIZE(ALL('Historical ASP'),[Country],"__Margin",[Margin])
VAR __Result = MINX(__Table,[__Margin])
RETURN
__Result
hi @Anonymous
Seems on the wrong granularity, try like:
Min Margin =
MINX(
SUMMARIZE(
'Historical ASP',
'Historical ASP'[Country],
'Historical ASP'[PH7]
),
[Margin]
)
@Anonymous Try:
Min Margin =
VAR __Table = SUMMARIZE(ALL('Historical ASP'),[Country],"__Margin",[Margin])
VAR __Result = MINX(__Table,[__Margin])
RETURN
__Result
@Greg_Deckler Thanks that works. Was wondering, if I wanted to measure MINX only for selected Country fields from the slicer, where do I add that in?
Try ALLSELECTED instead of ALL.
Check out the July 2025 Power BI update to learn about new features.
User | Count |
---|---|
23 | |
9 | |
7 | |
6 | |
6 |
User | Count |
---|---|
28 | |
11 | |
11 | |
10 | |
6 |