Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
In my dataset, I have a column with multiple text values. I am looking for assistance with a DAX statement that will allow me to change the values (in a new column) to something more description. For instance:
If B = Blue, If R=Red, If Y = Yellow
I am having problems creating mutliple conditions and have Power BI accept the statement.
Thanks in advance for the help!
Solved! Go to Solution.
@Anonymous
New Column =
Switch (Position[Formal]),
"B", "Blue",
"R", "Red",
"Y", "Yellow",
"Other")
Proud to be a Super User!
@Anonymous
column = switch(fieldname,
"b", "Blue",
"r", "red")
etc
Proud to be a Super User!
@Anonymous
whats your field name?
Proud to be a Super User!
@Anonymous
New Column =
Switch (Position[Formal]),
"B", "Blue",
"R", "Red",
"Y", "Yellow",
"Other")
Proud to be a Super User!
Position (Formal)
Will this be a new column, or change the existing?
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 40 | |
| 35 | |
| 34 | |
| 31 | |
| 28 |
| User | Count |
|---|---|
| 136 | |
| 102 | |
| 68 | |
| 66 | |
| 58 |