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.
Could anyone help me with this? I keep getting this error message
Expression.Error: The name 'IF' wasn't recognized. Make sure it's spelled correctly
Table.AddColumn(#"Added Conditional Column1", "Custom", IF (
AND ( [IncidentsPrevMth]-([NoofIncidentsLast12]/12)>0, [IncidentsPrev2ndMth]-([NoofIncidentsLast12]/12)>0),
1,0))
hi @PaulaMA ,
try like:
You might want to code custom columns in the GUI custom column editor, this looks like you got it out of advanced editor.
The custom column editor has better syntax support and error messages.
Hi @PaulaMA
If you are using PQ, you need to change the syntax (you're mixing with DAX):
You should do something similar to this (could be some syntax error with parenthesis because of doing it here):
Table.AddColumn(#"Added Conditional Column1", "Custom", each if ([IncidentsPrevMth]-([NoofIncidentsLast12]/12))>0 and ([IncidentsPrev2ndMth]-([NoofIncidentsLast12]/12))>0 then
1 else 0)
I mean, if..then..else for the ifs conditions and the keyword "and" to do the AND
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 |
---|---|
10 | |
8 | |
7 | |
6 | |
6 |