Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
rpinxt
Solution Sage
Solution Sage

Return value of column B on max of column A

I have this simple table that is used in a slicer:

rpinxt_0-1663743672828.png

Now I want to have the max that has been chosen in the slicer.

This means if LBE1 and LBE3 are selected I want the measure to return LBE3

 

With a MAX I can determine the correct Measure Name. Had not expected it to work on names but it seems to be doing it just fine.

Maybe because the ID number in the table.

 

BUT not only the 'Measure Name' LBE3. There is also a measure called LBE3.

So that is the value I need to return because I want it to calculate LBE3 -/- Actual (or whatever LBE selected is highest)

 

How would I link the max slicer selection with the corresponding Measure?

 

 

1 ACCEPTED SOLUTION
rpinxt
Solution Sage
Solution Sage

Ok was able to fix it myself with a Switch 😁

 

So if people have a similar problem (realised my subject is not really covering it....)
I already had my max LBE:

MaxLBE = MAX('Measure Selection'[Measure Name])
 
Then I made the switch:
LBE_Choice =
SWITCH(
    TRUE(),
    [MaxLBE] = "LBE1", [LBE1],
    [MaxLBE] = "LBE2", [LBE2],
    [MaxLBE] = "LBE3", [LBE3],
    [MaxLBE] = "LBE4", [LBE4],
    "Choose an LBE"
)
 
Note: I also could have made the MAX on the ID from the table and use the numbers in the Switch.

View solution in original post

1 REPLY 1
rpinxt
Solution Sage
Solution Sage

Ok was able to fix it myself with a Switch 😁

 

So if people have a similar problem (realised my subject is not really covering it....)
I already had my max LBE:

MaxLBE = MAX('Measure Selection'[Measure Name])
 
Then I made the switch:
LBE_Choice =
SWITCH(
    TRUE(),
    [MaxLBE] = "LBE1", [LBE1],
    [MaxLBE] = "LBE2", [LBE2],
    [MaxLBE] = "LBE3", [LBE3],
    [MaxLBE] = "LBE4", [LBE4],
    "Choose an LBE"
)
 
Note: I also could have made the MAX on the ID from the table and use the numbers in the Switch.

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Kudoed Authors