Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
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 MSCUST for a $150 discount!
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
124 | |
79 | |
50 | |
38 | |
38 |
User | Count |
---|---|
195 | |
80 | |
70 | |
51 | |
42 |