Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The FabCon + SQLCon recap series starts April 14th at 8am Pacific. If you’re tracking where AI is going inside Fabric, this first session is a can't miss. Register now

Reply
Anonymous
Not applicable

Use SWITCH in PowerQuery Transform steps

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).

 

Brenden_0-1687447634721.png

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

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 !!!

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

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 !!!

Anonymous
Not applicable

I'm not thrilled that I will have to write some elaborate nested if statement, but I really appreciate your (quick!) response. Thank you!

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.