Forum Discussion
Format with date languages
Hello,
In my dataset I have a column Date wich needs to be formatted as follows: yyyy-MMMM.
The problem is that the month values are written in many languages (mostly in English and Italian).
The format is applied in my PowerQuery with the expression DataFormat.
I noticed that it works fine when months are in Italian, but it returns the following error when the months are in English:
"We couldn't parse the input provided as a Date value".
Thing is, I can't change the locale date settings in my Transform Data exactly because my months can be in many languages.
Do you guys know a good workaround?
Thank you.
Take a look at the USERCULTURE() function - https://learn.microsoft.com/en-us/dax/userculture-function-dax and
https://learn.microsoft.com/en-us/power-bi/create-reports/desktop-conditional-format-visual-titles#create-a-field-for-your-title are good places to start. I think one solution would be load the data in as a standard date format (i.e dd-mm-yyyy) and then use two separate measure(s) to display them in either English or Italian depending on what you need.
1 Reply
- vicky_Super User
Take a look at the USERCULTURE() function - https://learn.microsoft.com/en-us/dax/userculture-function-dax and
https://learn.microsoft.com/en-us/power-bi/create-reports/desktop-conditional-format-visual-titles#create-a-field-for-your-title are good places to start. I think one solution would be load the data in as a standard date format (i.e dd-mm-yyyy) and then use two separate measure(s) to display them in either English or Italian depending on what you need.