Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

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.

Reply
Anonymous
Not applicable

Power query if statement help

Can someone please help me with the error on the attached picture? It seems as though I'm missing something simple, but can seem to be able to get the syntax right. 

817599E9-EFA7-4EAD-98B6-C149FEB2AE0C.jpeg

1 ACCEPTED SOLUTION
nandic
Memorable Member
Memorable Member

@Anonymous , you have " sign on wrong place (in front of field name).
"[MRP Type]="ND" then ...
it should be
[MRP Type]="ND" then ...

 

Regards,

Nemanja Andic

View solution in original post

3 REPLIES 3
nandic
Memorable Member
Memorable Member

@Anonymous , you have " sign on wrong place (in front of field name).
"[MRP Type]="ND" then ...
it should be
[MRP Type]="ND" then ...

 

Regards,

Nemanja Andic

Anonymous
Not applicable

That was it! Can't believe I didn't catch that. Thank you!!

smpa01
Super User
Super User

@Anonymouscan you try it like this

if ([Index]=1 and [val]<>null) then 1 else if ([Index]>1 and [val]<>null) then 2 else 0
Did I answer your question? Mark my post as a solution!
Proud to be a Super User!
My custom visualization projects
Plotting Live Sound: Viz1
Beautiful News:Viz1, Viz2, Viz3
Visual Capitalist: Working Hrs

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors
Top Kudoed Authors