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
DebbieE
Community Champion
Community Champion

Power BI M Customer Column Where Flag is True AND date is NULL then 'true' Else False

Im struggling to find customer column examples

 

I basically want

 

Where Flag = True

AND Date is NULL

Then True

Else False

 

Ill keep looking but if anyone can give me the code that would be great

1 ACCEPTED SOLUTION
DebbieE
Community Champion
Community Champion

That was really odd.

 

To get over the above issue I created a Conditional Column

 

then I changed the M Code so it said ANd in it. this changed it into a custom column and it worked with the code as above. I dont really understand how but it did the trick

View solution in original post

4 REPLIES 4
DebbieE
Community Champion
Community Champion

IF AND.JPG

This is as far as I got. notice the error

amitchandak
Super User
Super User

@DebbieE , try

= If [Flag] = true and Date = null then true else false

Or this

=[Flag] = true and Date = null

refer 

http://excel-inside.pro/blog/2018/05/17/comparing-null-values-in-power-query/

IF AND 2 Error.JPG

the initial one created an error

 

I dont understand the second one because its just setting up the True and Null part of the logic without saying what you want to do

DebbieE
Community Champion
Community Champion

That was really odd.

 

To get over the above issue I created a Conditional Column

 

then I changed the M Code so it said ANd in it. this changed it into a custom column and it worked with the code as above. I dont really understand how but it did the trick

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.