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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Anonymous
Not applicable

How to return multiple measures

criteria.png

9 REPLIES 9
lattys
Frequent Visitor

I don't know if this helps but I wouldn't use switch here or at least try to swap them like STATION = SWITCH(B300_Ball[PHO]," "Tx1 ","Tx2"," ADMTR:1:1 ","Tx3"," ADMTR:1 ","Tx4"," ADMTR:2","Tx5"," ADMTR:2", B300_Ball[PHO]) (and I don't think this is what you are looking for) or use something like lookupvalue or even IF.  In my opinion the switch() function just "writes" Tx1 instead of ADMTR:1 and Tx4 instead of ADMTR:2. And if you don't have any other data next to those it isn't going to be easy, I think.

 

But I'm just a beginner in PBI and DAX. I would be really happy if this could help you even a little.

 

Here are some webpages that might help you:

https://community.powerbi.com/t5/Desktop/Dax-to-lookup-from-multiple-values/td-p/177451

https://powerpivotpro.com/2014/01/containsx-finding-if-a-value-in-table-1-has-a-matching-value-in-ta...

Anonymous
Not applicable

I've tried options and none working.. I'm still learning  and cant use  the 'if', lookupvalue or make any understanding of the links provided.

Please I'd need this help

How do you link the AMDR and Tx values? Are they in the same table? Are the "Tx" things  values or measures?

You could try : 

your_measure = IF(Values(B300_Ball[PHO])=" ADMTR:1"; AND("Tx1"; "Tx3";"Tx4"); IF(Values(B300_Ball[PHO])=" ADMTR:2"; AND("Tx3; Tx5"))

but maybe with "," instead of ";" (I have to use the semicolon so it just a habit of mine)

Anonymous
Not applicable

Tx(1-5) are Measures and the ADMTR:1 and ADMTR:2  is in another table.

 

I've tried your options and I get lots of errors on the DAX expression.

Please I'd need this help

 

Hi @Anonymous,

 

You can open Query Editor, add a index column like below:

 

w2.PNG

 

Then create a calculated column use Switch() function:

 

STATION = SWITCH([Index],1,Tx1 ,2,Tx2,3,Tx3,4,Tx4,5,Tx5)

 

 

Best Regards,
QiuyunYu

Community Support Team _ Qiuyun Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

 

Hi @Anonymous,

 

I have go through your pbix file, I find those measures Tx1, Tx2,...Tx6 use the same formula =SUM(A2011_ConfigData[DataValueDelta])*1

 

Is there any reason that you create so many same measures? 

 

Besides, the Station is blank so the slicer doesn't have any values. You define the calculated column to return different results with more than one same condition, eg: when [Index] =1, return Tx1, Tx2, Tx3, it makes confusion so no values returned. As those measures use same formula, you can just create a Station column with [Tx1] t return data. 

 

q4.PNG

 

Best Regards,
Qiuyun Yu 

Community Support Team _ Qiuyun Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

 

Hi @Anonymous,

 

In your DAX, when B300_Ball[PHO] equals "ADMTR:1" returns three differnet values "Tx1","Tx2" and "Tx3", so it will always picks the first result. It does the same for B300_Ball[PHO] equals "ADMTR:2".

 

For your data, when B300_Ball[PHO] equals "ADMTR:1", which rows should return the "Tx1", and which rows return "Tx2",which rows return "Tx3". Is there any logic? Please clarify it. Also clarify when B300_Ball[PHO] equals "ADMTR:2". 

 

q00.PNG

 

Best Regards,
QiuyunYu

 

 

Community Support Team _ Qiuyun Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

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.