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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

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
June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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

Top Solution Authors