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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
soubhik
Helper I
Helper I

How to input a value returned by measure to be inputed into a parameter?

How to input a value returned by measure to be inputed into a parameter?

So, I am using a nested min to get the minimum value of prices and return the name of the fighter with minimum strikes

 

But I want the value returned to be inputed into a parameter, so that it can be used later in different scenario

I created a nested if to return the fighter name for minimum strikes.How do I input the value returned by this measure into a parameter? For eg, I have a card that displays the hand strikes of the fighter with minimum strikes. How to populate that dynamically? 

Attached PBIX: https://drive.google.com/file/d/1l_THibyAAOuHnUDydw1GtgVFy6FXvZnX/view?usp=sharing"

 

Measure = 
var _Conor=calculate(SUM(Table1[Num]),FILTER(Table1,Table1[Fighters]="Conor"))
var _Nate=calculate(SUM(Table1[Num]), FILTER(Table1,Table1[Fighters]="Nate"))
var _GSP=calculate(SUM(Table1[Num]), FILTER(Table1,Table1[Fighters]="GSP"))
var _Jon=calculate(SUM(Table1[Num]), FILTER(Table1,Table1[Fighters]="Jon"))
return
if(MIN(_Conor,MIN(_GSP,MIN(_Nate,_Jon)))="Conor","Conor",
if(MIN(_Conor,MIN(_GSP,MIN(_Nate,_Jon)))="Nate","Nate",
if(MIN(_Conor,MIN(_GSP,MIN(_Nate,_Jon)))="GSP","GSP","Jon")))

 

1 REPLY 1
Stachu
Community Champion
Community Champion

your syntax is invalid beacase MIN returns numeric value (as 'Table1[Num] is numeric) and you compare it with text (figher's name).
try this instead

 

FighterWithMinimumStrikes = 
VAR __fighters = ADDCOLUMNS(ALLSELECTED('Table1'[Fighters]),"Points",CALCULATE(SUM(Table1[Num])))
VAR __withRank = ADDCOLUMNS(__fighters,"Rank",RANKX(__fighters,[Points],,ASC,Skip))
VAR __result = CONCATENATEX(FILTER(__withRank,[Rank]=1),[Fighters],"")
RETURN
__result

 

and reference for the result

 

PointsForMinStriker = 
VAR __minStriker = [FighterWithMinimumStrikes]
RETURN
CALCULATE(SUM('Table1'[Num]),'Table1'[Fighters]=__minStriker)

 

Capture.PNG



Did I answer your question? Mark my post as a solution!
Thank you for the kudos 🙂

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.