Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
I would like to use a column with a SWITCH formula in PowerQuery to identify bad values and replace them. In this example I have only one case, "#N/A", and the word "CHECK" to flag these for now. The Custom Column box gives me a checkmark of approval that No syntax errors have been detected. When I hit enter, the formula bar gives me an Expression Error. How can I use a SWITCH here?
PS I want to do this in the PowerQuery transformations, NOT after by adding a column, because there are additional tables derived from this one and I want the column included in them (without manually duplicating it for each derived table).
Solved! Go to Solution.
Hi @Anonymous ,
You cannot use SWITCH in Power Query. Instead use the below formula:
each if [act_pid] = "#N/A" then "CHECK" else ""
Give a Thumbs Up if this post helped you in any way and Mark This Post as Solution if it solved your query !!!
Hi @Anonymous ,
You cannot use SWITCH in Power Query. Instead use the below formula:
each if [act_pid] = "#N/A" then "CHECK" else ""
Give a Thumbs Up if this post helped you in any way and Mark This Post as Solution if it solved your query !!!
I'm not thrilled that I will have to write some elaborate nested if statement, but I really appreciate your (quick!) response. Thank you!
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
84 | |
75 | |
68 | |
41 | |
35 |
User | Count |
---|---|
107 | |
56 | |
52 | |
48 | |
40 |