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

The ultimate Microsoft Fabric, Power BI, Azure AI & SQL learning event! Join us in Las Vegas from March 26-28, 2024. Use code MSCUST for a $100 discount. Register Now

Reply
Kfausch
Helper II
Helper II

How to make specific dates blank

Hello,

 

I am using a OData feed to pull in a price list with a start and end date, in some cases the end date is left blank because we are not sure when the sales price will end. When this is pull into Power BI all the blank dates show as 1/1/2001. Is there a formula I can use to make all dates = 1/1/2001 blank?

 

This is what I tried:

IF ('Sales Price'[Ending_Date] = 1/1/2001, BLANK (), 'Sales Price'[Ending_Date])

 

But still pulls in the 1/1/2018 instead of making that cell blank.

 

Thanks in advance for any guidance!

1 ACCEPTED SOLUTION
jdbuchanan71
Super User
Super User

@Kfausch

It looks like you want to replace any [Ending_Date] of Jan 1st with a blank. If so, this should do the trick.

IF ( MONTH ( 'Sales Price'[Ending_Date] ) = 1 && DAY ( 'Sales Price'[Ending_Date] ) = 1, BLANK() , 'Sales Price'[Ending_Date] )

View solution in original post

2 REPLIES 2
EnsFlynn
Frequent Visitor

@Kfausch Alternatively, you could try using the Replace Values function in query editor to replace all of the 1/1/2001 with null values. Just open the query editor, right click somewhere in the end date column, and click replace values. A box should pop up (like the one below). Just enter what date you want to replace, and what you want to replace it with.

 

 

replace values.PNG

 

jdbuchanan71
Super User
Super User

@Kfausch

It looks like you want to replace any [Ending_Date] of Jan 1st with a blank. If so, this should do the trick.

IF ( MONTH ( 'Sales Price'[Ending_Date] ) = 1 && DAY ( 'Sales Price'[Ending_Date] ) = 1, BLANK() , 'Sales Price'[Ending_Date] )

Helpful resources

Announcements
Fabric Community Conference

Microsoft Fabric Community Conference

Join us at our first-ever Microsoft Fabric Community Conference, March 26-28, 2024 in Las Vegas with 100+ sessions by community experts and Microsoft engineering.

February 2024 Update Carousel

Power BI Monthly Update - February 2024

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

Fabric Career Hub

Microsoft Fabric Career Hub

Explore career paths and learn resources in Fabric.

Fabric Partner Community

Microsoft Fabric Partner Community

Engage with the Fabric engineering team, hear of product updates, business opportunities, and resources in the Fabric Partner Community.

Top Solution Authors