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

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

Reply
Anonymous
Not applicable

Token RightParem expected in IF statement

stuck_BI_1-1674198828617.png

I want the table to be like this but i am currently stuck at token rightparem error. 

 

stuck_BI_0-1674198539399.png

So i am currently creating a new column where if the rating value is true, it will show what the rating type is and null if it is false. 

However, I dont know where the issue is. From what I understand, the error occurs when there is missing bracket or etc. I just started learning Power BI so I hope you can help me with this.

4 REPLIES 4
pratyashasamal
Super User
Super User

Hi @Anonymous ,
Please try this 
Rating = IF( 'Table'[Rating Type] == True,[Rating Type],null )
OR
Rating = IF( 'Table'[Rating Type] == True,[Rating Type],"" )
Please refer to this link to learn more about If function : https://learn.microsoft.com/en-us/dax/if-function-dax
Thanks ,
Pratyasha Samal 
Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





Anonymous
Not applicable

So i change the formula to this  

IF( 'TestTable'[Rating Type] == True,[Rating Type],null )

as I assume the "table" refers to my table name.

 

So now i have another error "Token Literal"

Hi @Anonymous .
Please try as well
Measure =
IF( 'TestTable'[Rating Type] == True,[Rating Type],"" )
Thanks ,
Pratyasha Samal 
Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





Hi @Anonymous ,
please add a new column column 

Column = IF( 'Table (2)'[Product value] == TRUE() , 'Table (2)'[Product Type] ," ")

pratyashasamal_0-1674204133329.png

Thanks ,
Pratyasha Samal
Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

Find out what's new and trending in the Fabric Community.

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

Check out the November 2024 Power BI update to learn about new features.