cancel
Showing results for 
Search instead for 
Did you mean: 
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
Solution Sage
Solution Sage

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

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

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

 

Helpful resources

Announcements
PBI Sept Update Carousel

Power BI September 2023 Update

Take a look at the September 2023 Power BI update to learn more.

Learn Live

Learn Live: Event Series

Join Microsoft Reactor and learn from developers.

Dashboard in a day with date

Exclusive opportunity for Women!

Join us for a free, hands-on Microsoft workshop led by women trainers for women where you will learn how to build a Dashboard in a Day!

MPPC 2023 PBI Carousel

Power Platform Conference-Power BI and Fabric Sessions

Join us Oct 1 - 6 in Las Vegas for the Microsoft Power Platform Conference.

Top Solution Authors