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!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
Hi All ,
i'm looking at aking a donitonal column so when building = "Store 1" = 2
Building | Conditonal column |
Art & Design | 1 |
Humanties | 2 |
Science | 3 |
Then i want to create another column that says if Conditonal column one = "2" then use a certain Measure.
Essentially a conditonal column , that says when another conditonal column = a certain value use a specfic measure.
I'm thinknig it would be using the if function but i'm unsure how to write it.
Thanks , James.
Solved! Go to Solution.
Hi @JamesBurke ,
Thanks for the reply from uzuntasgokberk , please allow me to provide another insight:
You can also choose to use the switch function for this. More details about this function can be found in the documentation: SWITCH function (DAX) - DAX | Microsoft Learn
Column =
SWITCH('Table'[Conditonal column],
1, "A",
2, "B",
3, "C",
"Other")
If your Current Period does not refer to this, please clarify in a follow-up reply.
Best Regards,
Clara Gong
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @JamesBurke ,
Have you already solved the problem? If so, can you share your solution here and mark the correct answer as standard to help other members find it faster? Thank you very much for your co-operation!
Best Regards,
Clara Gong
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @JamesBurke ,
Thanks for the reply from uzuntasgokberk , please allow me to provide another insight:
You can also choose to use the switch function for this. More details about this function can be found in the documentation: SWITCH function (DAX) - DAX | Microsoft Learn
Column =
SWITCH('Table'[Conditonal column],
1, "A",
2, "B",
3, "C",
"Other")
If your Current Period does not refer to this, please clarify in a follow-up reply.
Best Regards,
Clara Gong
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hello @JamesBurke,
You can write if conditonal on Power Query and Calculated Column(Dax).
Below the example is example of Power Query if:
if ([C] = "A" or [C] = "B") and [D] = "PASS" then "PASS"
else if [C] = "C" and [D] = "PASS" then "PASS"
else "FAIL"
İf you'd like to write new column(calculated column DAX):
IF(
table[colname] = 1,
"PASS",
IF(
table[colname] >1,
"MED",
"FAIL")
)
Also you can use switch function instead of IF. it better performance than "if" in the DAX.
Kind Regards,
Gökberk Uzuntaş
📌 If this post helps, then please consider Accepting it as a solution and giving Kudos — it helps other members find answers faster!
🔗 Stay Connected:
📘 Medium |
📺 YouTube |
💼 LinkedIn |
📷 Instagram |
🐦 X |
👽 Reddit |
🌐 Website |
🎵 TikTok |