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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
aarola
Frequent Visitor

"cannot convert text to date type" dddd, hh:mm:ss

I am using formula format (date, "dddd, hh:mm:ss"). Seems like this custom format is not accepted as date type, so I can only get it as a text. If I try to set it as a date type, I am getting error "cannot convert text to date type".

 

Is it possible to add additional date formats? 

 

Since Power BI only takes it as text, this is the resulting x-axis graph...image.png

 

 

 

 

Power BI tries to show all of the points (15 min over 1 week), which is not possible to fit in any graph. As far as I know, that would be solved if it was a date type axis.

 

Any ideas? Thanks!

 

 

 

4 REPLIES 4
aarola
Frequent Visitor

Still didn't get any valid solution. Found another example, someone trying to do something quite similar:

https://www.reddit.com/r/PowerBI/comments/7f60kg/how_to_get_cumulative_line_chart_with_monthday_on/

 

 

Tried applying hierarchy, didn't work, axis does not autoscale:

 

image.png

 

Tried with a "time index", so that axis is a whole number, defining a continuous value for each axis point, but then you don't have a clue of axis position (day? time?):

 

image.png

 

Tried increasing page size, but visuals do not scale properly.

 

Would it be possible to create a custom line chart visual which allows to do something like this? Any other options?

 

Thank you everyone involved.

Phil_Seamark
Microsoft Employee
Microsoft Employee

Hi @aarola

 

You are better off using an actual date field for the axis.  That will stop you needing to scroll left and right.

 

If you use the FORMAT function, you are converting your date to a TEXT value, which won't auto scale on the axis.

 


To learn more about DAX visit : aka.ms/practicalDAX

Proud to be a Datanaut!

Hi @Phil_Seamark,

 

Thank you for your answer. I am trying to compare my data between weeks. That's what I am trying to do:

 

image.png

 

That's why I cannot have a "real" date, I just want to compare mondays all together.

@aarola,

It is not possible to convert your field from text to date type as the values in the field are not valid dates.

Consider to use real date field as other post, or reduce the rows in your table.

Regards,

Lydia

Community Support Team _ Lydia Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.