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
Hi,
I just got my hands on Power BI and now trying get some functionality from SSRS to Power BI... And I'm a newbie in both
Is this, or even part of it, possible with Dax or something else in Power BI?
=Switch( Fields!Category.Value="C",Fields!RevenueWithProbability.Value, Fields!Category.Value="B",Fields!Revenue.Value, Fields!Category.Value="D",Fields!Revenue.Value, Fields!Yearmonth.Value<=Parameters!InvoiceMonth.Value,Fields!InvoicedAmount.Value, Fields!Yearmonth.Value>Parameters!InvoiceMonth.Value,Fields!EstimatedValue.Value)
I've tried different variations of Switch and If without luck so far. Any suggestions, except get some beer and forget it? ![]()
Solved! Go to Solution.
Hi @Andy_W,
In Power BI, we can create a calculated column, then specify DAX expression with Switch() function to return corresponding value based on the condition like below:
Column = SWITCH(TRUE(),Table1[value]>60,"Green",Table1[value]<=60, "Red")

DAX – Making the “Case” for SWITCH()
In addition, in Power BI, Query Parameter is available, but we are not able to use reference the query parameter in DAX expression like in SSRS. Regarding query parameter, please see this article: Deep Dive into Query Parameters and Power BI Templates.
If you have any question, please feel free to ask.
Best Regards,
Qiuyun Yu
Hi @Andy_W,
In Power BI, we can create a calculated column, then specify DAX expression with Switch() function to return corresponding value based on the condition like below:
Column = SWITCH(TRUE(),Table1[value]>60,"Green",Table1[value]<=60, "Red")

DAX – Making the “Case” for SWITCH()
In addition, in Power BI, Query Parameter is available, but we are not able to use reference the query parameter in DAX expression like in SSRS. Regarding query parameter, please see this article: Deep Dive into Query Parameters and Power BI Templates.
If you have any question, please feel free to ask.
Best Regards,
Qiuyun Yu
@Andy_W In power bi desktop go to query editor and under Transform tab you can use Replace Values option which lets you do similar to Swith or Case statement.
@ankitpatira Thanks! Not quite sure yet how to use Replace Values option similarly like SSRS does with that script dynamically, but I will look into that.
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 58 | |
| 45 | |
| 42 | |
| 20 | |
| 18 |