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

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

Reply
Anonymous
Not applicable

Token RightParen Error With IF Function

I think DAX is having a meltdown here. I originally had a column named "request_source" that is a 1 or 0 field. I converted this to True/False. I want to create another column that states "Requested" if true, or a "Not Requested" if false. The DAX function I'm using is as follows:

=if(#"Emergency Orders"[request_source], "Requested", "Not Requested")

The intellisense is putting a red squiggly under the q in "Requested" and saying "Token RightParen expected." This makes no sense, and I have no idea what I'm doing wrong. Any help would be appreciated.

 

 

1 ACCEPTED SOLUTION

Hello @Anonymous 

 

DAX is the language to be used in your data model. Your original function posted is a mixture of DAX and Power Query.

Power Query is the mashup language used in Power BI to reshape your data.

However - this is the function in DAX

=if('Emergency Orders'[request_source], "Requested", "Not Requested")

this is the power query version

=if #"Emergency Orders"[request_source] then  "Requested" else "Not Requested"

 

If this post helps or solves your problem, please mark it as solution (to help other users find useful content and to acknowledge the work of users that helped you)
Kudoes are nice too

Have fun

Jimmy

View solution in original post

4 REPLIES 4
Anonymous
Not applicable

Thanks for your all's help. I ended up creating the column outside of PowerQuery and it worked fine? That was odd. Apparently the syntax for PowerQuery and creating a column directly from the report is different.

Hello @Anonymous 

 

DAX is the language to be used in your data model. Your original function posted is a mixture of DAX and Power Query.

Power Query is the mashup language used in Power BI to reshape your data.

However - this is the function in DAX

=if('Emergency Orders'[request_source], "Requested", "Not Requested")

this is the power query version

=if #"Emergency Orders"[request_source] then  "Requested" else "Not Requested"

 

If this post helps or solves your problem, please mark it as solution (to help other users find useful content and to acknowledge the work of users that helped you)
Kudoes are nice too

Have fun

Jimmy

Jimmy801
Community Champion
Community Champion

Hello

I think your table identifier is wrong.
Try this syntax
=if('Emergency Orders'[request_source], "Requested", "Not Requested")

Hope it helps

Jimmy
artemus
Microsoft Employee
Microsoft Employee

There might be a character encoding issue. Try to replace the quote marks with ones from your keyboard.

 

Also, sometimes the incorrect indicator (red squiggly) is off while changing the formula. See if it is still there when you click off and back onto the calculated column.

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.