Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code FABINSIDER for a $400 discount.
Register nowThe Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.
Hi,
I have added in a formula to convert a column from DD MMMM YYYY to MMMM YYYY. I have added a column to do this but when I try and change the data type to 'Date' its saying it cannot convert it -
can anyone help with this?
Thanks
Solved! Go to Solution.
The null values are the issue.
So let's try this...
Month_Year =
DATEVALUE(
IF(
ISBLANK([End]),
BLANK(),
FORMAT([End], "MMMM YYYY")
)
)
Proud to be a Super User! | |
Have you tried using the DATEVALUE function?
Learn - DATEVALUE()
Proud to be a Super User! | |
Still getting the same error 😞
Month_Year =
DATEVALUE(
FORMAT('Absence Data'[End], "MMMM YYYY")
)
Does this get you the result you need?
Proud to be a Super User! | |
Nope still getting the same error 😞
Alrighty. What happens when you use...
FORMAT('Absence Data'[End], "MMMM YYYY")
without wrapping it in the DATEVALUE()?
Proud to be a Super User! | |
that formula works but when I try and change the format of that to date rather than text I get an error. Can I not change this column so it behaves like a date column?
You can absolutely change the column type to date. Based on the continued reappearance of the error I am thinking that there is/are values in your 'End' column that are not playing nice.
Your initial screen shot did not contain any data in the 'End' column so I have been making assumptions that the data in the 'End' column was sound. My suggestion at this point would be to review the contents of that column to ensure that there are no anomalies.
Proud to be a Super User! | |
so the 'end' is a date field, the only thing I can see in it is it has 'null' values but it needs to as on some rows this will be blank
The null values are the issue.
So let's try this...
Month_Year =
DATEVALUE(
IF(
ISBLANK([End]),
BLANK(),
FORMAT([End], "MMMM YYYY")
)
)
Proud to be a Super User! | |
Yes that worked! Thank you! 🙂
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the February 2025 Power BI update to learn about new features.
User | Count |
---|---|
27 | |
26 | |
23 | |
12 | |
10 |
User | Count |
---|---|
25 | |
21 | |
19 | |
19 | |
11 |