Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code FABINSIDER for a $400 discount.
Register nowGet inspired! Check out the entries from the Power BI DataViz World Championships preliminary rounds and give kudos to your favorites. View the vizzies.
I am trying to create a new column using an IF statement. If the column 'Survey Type' = AML Quantitative then return with the value in column 'Status'. In the status column there are various answers such as 'Completed', 'Not Started' or 'Compliance Review 4 in progress' etc. That is the value I would like to return. Below is the if statement with no syntax errors.
When hit 'Ok' it says: 'Expression.Error: The name 'IF' wasn't recognized. Make sure it's spelled correctly.' When I change IF to if I get the following message:
I remove the ) but it doesn't change anything. I am new to this so any help would be appreciated.
Solved! Go to Solution.
Hi @AnjaD
In M, I think you need to use if conditional in this way:
IF <condition> then <ResultTrue> else <ReturnFalse>
So if I'm not wrong, you should write:
IF [Survey Type]="AML Quantitative" then [Status]
Anyway, taking into account the error given, the problem is you are missing a ")", so you need to add it, not to remove it
@mlsx4 thank you very much. I figured it out. You saved my day!!
IF [Survey Type]="AML Quantitative" then [Status] else ""
You're welcome! I'm glad it works now
I tried that and now I get this error:
Not sure how to fix that.
Hi @AnjaD
In M, I think you need to use if conditional in this way:
IF <condition> then <ResultTrue> else <ReturnFalse>
So if I'm not wrong, you should write:
IF [Survey Type]="AML Quantitative" then [Status]
Anyway, taking into account the error given, the problem is you are missing a ")", so you need to add it, not to remove it
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code FABINSIDER for a $400 discount!
Check out the February 2025 Power BI update to learn about new features.
User | Count |
---|---|
88 | |
74 | |
63 | |
48 | |
36 |
User | Count |
---|---|
116 | |
86 | |
80 | |
59 | |
39 |