Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Can someone help with this formula. I'm getting a RightParen error
if( [#"Which Centre do you work in?"] = "Box Hill" then "Australia"
I need to do multiple if then else statements whereby it looks that the centre and determines a country. In this example if the centre is Box Hill I want the column to say Australia... I haven't done the else part of the formula cause it doesn't even like the text "Australia'. The red squiggle line is under "Aus so it does not like me typing "Australia" Why?
Solved! Go to Solution.
Hi @Anonymous
You can add a conditional column, it is easier way to achieve your goal.
https://radacad.com/conditional-column-in-power-bi-using-power-query-you-can-do-anything
Hi @Anonymous
You can add a conditional column, it is easier way to achieve your goal.
https://radacad.com/conditional-column-in-power-bi-using-power-query-you-can-do-anything
hi @Anonymous,
assuming your are trying to do this in Power Query, the syntax of the if-function is like this:
if test then value_if_true else value_if_false
without any paranthesis.
Cheers,
Sturla
If this post helps, then please consider Accepting it as the solution. Kudos are nice too.
No this does not work with or wthout parenthesis
Reminder I'm after text not a value
if test then text_if _true else text _if_false
I can't make out what your column name is, but if you add a custom column in power query this is the syntax
if [column name] = "Box Hill" then "Australia" else "Other"
Notice that the comparison is case sensitive
Cheers,
Sturla
I domnt type in the column name I insert it from the list provided
if( [#"Which Centre do you work in?"] = "Box Hill" then "Australia" else (from here a new if test begins)
as soon as I start typing "Australia" the error appears
In the screen shot you just provided, there is a paranthesis after if. The red underline highlighting error, behaves a bit erratic, so when I write this custom column it pops up on every word, even if there is no error. But once I get to the end, it disappears, and the formula evaluates correctly
It does not disappear. I have tried completing the formula many times
The RightParen error remains and the "ok" button id greyed out so I cannot click on it
The code you posted starts with
= if (
Why the paranthesis?
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
97 | |
96 | |
81 | |
74 | |
66 |
User | Count |
---|---|
126 | |
105 | |
103 | |
81 | |
72 |