Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hello,
I am a bit new to this platfrom, and I am trying to write the below formula, but I am getting a Token RightParen expected error, and I am not sure why is the issue. It is highligting the "FH". Please help me to figure out the issue.
=if(Left([Season],1)="F" then "FH" else "SS")&Rright([Season],2)
Thanks,
WV
Solved! Go to Solution.
Hi @Anonymous
In query editor,you may create a custom column with M language:Text.Start and Text.End like below.
=(if Text.Start([Season],1)="F" then "FH" else "SS")&Text.End([Season],2)
Second way in DAX with IF function.New a column in data view.
Column = IF(LEFT(Table5[Season],1)="F","FH","SS")&RIGHT(Table5[Season],2)
Regards,
Hi @Anonymous
In query editor,you may create a custom column with M language:Text.Start and Text.End like below.
=(if Text.Start([Season],1)="F" then "FH" else "SS")&Text.End([Season],2)
Second way in DAX with IF function.New a column in data view.
Column = IF(LEFT(Table5[Season],1)="F","FH","SS")&RIGHT(Table5[Season],2)
Regards,
This is perfect! Thank you so much for your help!
Wendy
If you are having trouble with the DAX syntax try the following (looks like you wrote this for Tableau. DAX has a learning curve coming from Tableau).
= IF( LEFT([Season],1) = "F", "FH", "SS" )
I am not sure what you are trying to accomplish with the last portion "&Rright([Season],2)"
If my solution didn't work, then it would be helpful if you posted some sample data or at least an example of the sample input and desired outcome.
Where exactly are you doing this. If you are doing a DAX formula, this will not work.
Please look at this similar question and solution...
https://community.powerbi.com/t5/Desktop/if-then-else/td-p/117999
good luck!
Luis
If this was helpful, consider marking it as solved so others can find it easily.
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
69 | |
68 | |
40 | |
29 | |
26 |
User | Count |
---|---|
89 | |
49 | |
44 | |
38 | |
37 |