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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
petelanglois
Regular Visitor

How to remove a specific date from a date column

Hello,

 

I have a calculated date column with date+time values. I changed the data type to short date so the time component is no longer there.

 

I would like to create a new column that contains the same values as the original column, but with all records that have the value 05/29/2021 to be replaced with blanks. I’m having trouble figuring out how to do this.

 

Currently, I’m using the following dax:

 

new date column = IF(DimLeads[Date] = date(2021,05,29), BLANK(), DimLeads[Date])

 

The current result is a new column that contains the date+time values, including for 5/29/2021, even though I changed the data time in the original column to be short date.

 

Can anyone explain how to write dax to do this?

 

Thank you!
Pete

1 ACCEPTED SOLUTION
v-zhangti
Community Support
Community Support

Hi, @petelanglois 

 

I tried to use your if function to achieve the result you want.

Column = 
IF ( DimLeads[Date] = DATE ( 2021, 05, 29 ), BLANK (), DimLeads[Date] )

vzhangti_0-1636007993241.png

Is the expected result you want like this? If not, please reply with more details. Thank you.

 

Best Regards,

Charlotte Zhang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
v-zhangti
Community Support
Community Support

Hi, @petelanglois 

 

I tried to use your if function to achieve the result you want.

Column = 
IF ( DimLeads[Date] = DATE ( 2021, 05, 29 ), BLANK (), DimLeads[Date] )

vzhangti_0-1636007993241.png

Is the expected result you want like this? If not, please reply with more details. Thank you.

 

Best Regards,

Charlotte Zhang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

TheoC
Super User
Super User

Hi @petelanglois 

 

Apologies mate, had to adjust previous. This is what you're after 🙂

 

Column =

VAR _DateBlank = DATE ( 2021 , 5 , 29 )
VAR _DateColumn = 'Calendar'[Date]

RETURN

IF ( _DateBlank = _DateColumn , BLANK() , _DateColumn )
Please adjust the table to relevant table and column name.  Outputs below:
TheoC_1-1635831015119.png

 

All the best 

Theo 🙂

If I have posted a response that resolves your question, please accept it as a solution to formally close the post.

Also, if you are as passionate about Power BI, DAX and data as I am, please feel free to reach out if you have any questions, queries, or if you simply want to connect and talk to another data geek!

Want to connect?www.linkedin.com/in/theoconias

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors