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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
Satish_Kumar
Helper V
Helper V

Error while Using "IF"

This is what i donot able to understand.PAGE1.PNG

 

This page is showing all is well used but what happened next i donot know....................

 

 

PAGE 2.PNG

5 REPLIES 5
MarcelBeug
Community Champion
Community Champion

In Power Query, the syntax is if … then … else ….(all lower case):

= if [Currency Factor]<>0 then [SALE]/[Currency Factor] else 0

 

Are you sure about else 0? I would expect …. else [SALE]

Specializing in Power Query Formula Language (M)

@MarcelBeug

Yes!

I am sure about that beacause i have that value in my column.

@Satish_Kumar

 

@MarcelBeug's expression should work. You need to use Power Query IF statement when adding custom column. For more details, see: Power Query if Statements

 

Regards,

 

 

 

@Satish_Kumar

Is your issue solved now? Any questions remaining?

Specializing in Power Query Formula Language (M)

@MarcelBeug

 

Edit Queries showing "then" as error.

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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