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.
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
Solved! Go to Solution.
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] )
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.
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] )
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.
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 )
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
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
114 | |
99 | |
83 | |
70 | |
60 |
User | Count |
---|---|
150 | |
115 | |
104 | |
89 | |
65 |