cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
DennisJung Regular Visitor
Regular Visitor

Date Convert problem

hey,

 

i have an problem to convert simple text to a date since today, and i dont know why. (it worked till yesterday)

 

i have the following rows / dax formula:

 

 

This is the row i need to convert. If i change the format, i get an error. (text to date not possible)

 

So, i used these formulas to extract part of the dates and put it together.

 

Jahr = PATHITEM(SUBSTITUTE(StandardVerkauf[Verkaufsvorgang.Vorgangsdatum];"-";"|");1)

 

Monat = PATHITEM(SUBSTITUTE(StandardVerkauf[Verkaufsvorgang.Vorgangsdatum];"-";"|");2)

 

Datum = StandardVerkauf[Monat] & "." & StandardVerkauf[Jahr]

 

Jahr = Year, Monat = Month, Datum = Date (translation)

 

 

This results in this

 

 

 

The row Datum is set to Date Format and it worked perfectly till today. When i now update / refreseh my dataset, i get the following error for the column Datum.

 

 

Translation: The Value "." of type text can not be converted to the type date.

 

Same if i try to convert only the year.

 

Datum = StandardVerkauf[Jahr]

 

Same error.

 

Can someone help me please? Smiley Happy

 

 

 

2 ACCEPTED SOLUTIONS

Accepted Solutions
Highlighted
Vvelarde Super Contributor
Super Contributor

Re: Date Convert problem

@DennisJung

 

Try in Query Editor--Transform--Date--Parse

 




Lima - Peru
Did I answer your question? Mark my post as a solution!

Proud to be a Datanaut!




View solution in original post

Community Support Team
Community Support Team

Re: Date Convert problem

Hi @DennisJung,

 

You can use power query date functions to split the date column, add a custom column to store them.

Sample:

    #"Added Custom" = Table.AddColumn(#"Renamed Columns", "Year", each Date.Year([Created])), 
    #"Added Custom1" = Table.AddColumn(#"Added Custom", "YearMonth", each Date.ToText([Created],"yyyy.MM"))

 

Reference link:

Date functions

Date.ToText

 

Regards,

Xiaoxin Sheng

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



For learning resources/Release notes, please visit: | |

View solution in original post

2 REPLIES 2
Highlighted
Vvelarde Super Contributor
Super Contributor

Re: Date Convert problem

@DennisJung

 

Try in Query Editor--Transform--Date--Parse

 




Lima - Peru
Did I answer your question? Mark my post as a solution!

Proud to be a Datanaut!




View solution in original post

Community Support Team
Community Support Team

Re: Date Convert problem

Hi @DennisJung,

 

You can use power query date functions to split the date column, add a custom column to store them.

Sample:

    #"Added Custom" = Table.AddColumn(#"Renamed Columns", "Year", each Date.Year([Created])), 
    #"Added Custom1" = Table.AddColumn(#"Added Custom", "YearMonth", each Date.ToText([Created],"yyyy.MM"))

 

Reference link:

Date functions

Date.ToText

 

Regards,

Xiaoxin Sheng

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



For learning resources/Release notes, please visit: | |

View solution in original post

Helpful resources

Announcements
Can You Solve These Challenge

Challenge: Can You Solve These?

Find out how to participate in the first Power BI 'Can You Solve These?' challenge.

Community News & Announcements

Community News & Announcements

Get your latest community news and announcements.

Virtual Launch Event

Microsoft Business Applications October Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

Community Kudopalooza

Win Power BI Swag with Community Kudopalooza!

Each week, complete activities and be qualified in the drawing for cool Power BI Swag.

Users Online
Currently online: 6 members 807 guests
Please welcome our newest community members: