Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hey Everybody,
I am trying to add a custom column using the custom column formula as follows:
SWITCH (
TRUE (),
[FF]="D" and [PB]="A", "First",
[FF]="De" and [PB]="A", "Second"
)
Power BI is telling me the name SWITCH wasn't recognized.
I have posted the .pbix file here
Pls advise formula to check multiple conditions in numerous columns and return distinct values.
I am also very open to a derivation on the following "IF" formula:
(if
([FF]= "D"
and
[PB]= "A")
then"First"
else"Not First")
BUT, that allows me to tag the "this and that" conditions, seperated by multiple "or" as I go down the stack of all the conditions I have to check for. the "else" line of code above is what is throwing me.
Thanks so much!!!
mibu
Solved! Go to Solution.
Hi @mibu ,
Custom = SWITCH ( TRUE (), [FF]="D" && [PB]="A", "First", [FF]="De" && [PB]="A", "Second" )
I tried your switch and it worked on your pbix.
Hi,
Try this calculated column formula
=IF(AND([FF]="D",[PB]="A"),"First",IF(AND([FF]="De",[PB]="A"),"Second",BLANK())
Hope this helps.
Hi @mibu ,
Custom = SWITCH ( TRUE (), [FF]="D" && [PB]="A", "First", [FF]="De" && [PB]="A", "Second" )
I tried your switch and it worked on your pbix.
Thanks so much @mussaenda! It did work! I just needed to create a Meausure, not add a column. Switch is not a custom column formula. Thanks for the assist... I apprecite it!! Best, mibu
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
108 | |
100 | |
78 | |
64 | |
58 |
User | Count |
---|---|
148 | |
113 | |
97 | |
84 | |
67 |