Forum Discussion
How to return multiple measures
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
- Anonymous9 years agoNot 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
- lattys9 years agoFrequent Visitor
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)
- Anonymous9 years agoNot 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