Forum Discussion
Language of month's name extracted from a date in a dynamic table from Power Pivot Data Model
Hi Marco_RC
I think I can replicate what you explained, though I'm not sure where the issue comes from... I had similar challenges in the paste and instead of wastihg time investigating the reason I built my own Calendar/Date table with Power Query (I can provide the query)
Fixing your particular workbook (get months in Spanish) should be doable. However, depending on how the data loads to the Data Model the approach might be different. If you could share your workbook that would be ideal...
An improssible quick-fix would have been:
but the 3rd argument (locale_name) of the DAX https://learn.microsoft.com/en-us/dax/format-function-dax function is currently supported in PowerBI only
- Marco_RCNov 17, 2023Copper Contributor
Hi Lorenzo ,
Thank you very much for the answer.
We used a similar approach through Power Query to resolve the problem. However, I'm sharing with you the sample workbook and I would like to know the details of your proposed solution, please.
Also we saw the format parameter on the MONTH dax function, and it is quite absurd that it is not supported in Excel, it would help a lot.
My concern is that, on a Pivot Table, when the user add a date type field, Excel automatically generate the conversion of the month and it will show the wrong value, so it is really misleading.
- LorenzoNov 18, 2023Silver Contributor
Hi Marco_RC
For your workbook created on Windows 10 US Pro with en-US regional format, just in case you did not think about it...
Create on a sheet you'll hide later:
For clarity let's assume the table that holds the month names in English in called Facts
- Load MonthsES to the Data Model
- Create a relationship between MonthsES (on [ID]) and Facts (field is probably [date (Month Index)]
- On Facts add a calculated column [Month] with formula: =RELATED(MonthsES[Month])
- Hide column [date (Month)] from the Client Tools
- Remove [date (Month)] from your Pivot
- Add [Month] instead(Implemented in attached file)
BTW about DAX FORMAT function, forgot to mention I also tried the following some time ago. No error is raised but that doesn't have the expected effect: =FORMAT([date], "[$-es-MX]MMM")