Forum

Notifications
Clear all

data format error

4 Posts
2 Users
0 Reactions
135 Views
(@morielhamui)
Posts: 25
Eminent Member
Topic starter
 

I'm trying to create a new date column in order to be able to create a custom sort order for my slicer. The goal is for the slicer to be in calendar order, and to update as more data is added. attached is the main file and one of the source files for the table. 

 
Posted : 08/06/2021 2:03 pm
(@morielhamui)
Posts: 25
Eminent Member
Topic starter
 

previous table didn't save the full query- with the new column- when I try to upload the file I get an error that it is too large. 

Here is the command: #"Added Custom" = Table.AddColumn(#"Replaced Value", "Period", each Text.From([Processing Date],"yyyy-mm"))

 

Here is my error: DataFormat.Error: The specified culture is not supported.
Details:
yyyy-mm

 

currently my processing date column is formatted as a date 04/01/2021. 

 
Posted : 08/06/2021 2:12 pm
(@mynda)
Posts: 4761
Member Admin
 

Hi Moriel,

It's usually best to create a dummy file that contains just a sample of your data that illustrates the issue, as this keeps the file size manageable and protects your proprietary data, like my example file attached here.

The problem you have is that you're trying to enter "yyyy-mm" in the culture argument of Text.From, and "yyyy-mm" isn't a culture. A culture is a recognised code that specifies the language and region e.g. en-US

See the file attached where you can use this formula:

=Text.End(Text.From([Processing Date]),4) &"-"&Text.Start(Text.End(Text.From([Processing Date]),7),2)

 

Hope that helps.

Mynda

 
Posted : 08/06/2021 7:47 pm
(@morielhamui)
Posts: 25
Eminent Member
Topic starter
 

Thank you

 
Posted : 09/06/2021 10:31 am
Share: