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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Anonymous
Not applicable

AND function not working in POwer query

Hello Guys ! I am using this formula in Power query but it showing only else value 

 

if [Date Closed]="null" and [Critical Defect]0 then 1 else 0

1 ACCEPTED SOLUTION
CNENFRNL
Community Champion
Community Champion

if [Date Closed] is null and [Critical Defect] = 0 then 1 else 0

Thanks to the great efforts by MS engineers to simplify syntax of DAX! Most beginners are SUCCESSFULLY MISLED to think that they could easily master DAX; but it turns out that the intricacy of the most frequently used RANKX() is still way beyond their comprehension!

DAX is simple, but NOT EASY!

View solution in original post

3 REPLIES 3
CNENFRNL
Community Champion
Community Champion

if [Date Closed] is null and [Critical Defect] = 0 then 1 else 0

Thanks to the great efforts by MS engineers to simplify syntax of DAX! Most beginners are SUCCESSFULLY MISLED to think that they could easily master DAX; but it turns out that the intricacy of the most frequently used RANKX() is still way beyond their comprehension!

DAX is simple, but NOT EASY!

Anonymous
Not applicable

Thankyou so much but why = was not working and please adivse the if formula for date Column.thanks

ronrsnfld
Super User
Super User

Perhaps the contents of the cell is actually null and not a string containing null.  Try removing the quote marks around null.

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.