cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
hectormungo
Frequent Visitor

Change month name language

Hi. I have made some reports with Power BI Desktop (English version) and I added a column in every report with the formula:

MonthName = FORMAT( 'date_field'[fecha]; "mmmm" )

This gave me the name of the months in English. I would like to change them to Spanish. 

I have installed Power BI Desktop (Spanish version) and if I use that formula in a new report I get the name of the months in spanish. However, I can't do the same in the old reports, they remain in English even if I make a new column.

How can I change it without having to re-made all reports again? I'm using Spanish in the regional settings of the file.

 

Thanks in advance

1 ACCEPTED SOLUTION
Baskar
Resident Rockstar
Resident Rockstar

Two ways 

 

1. Go to file > options and settings > options > regional setting > select spanish

Save and close it . Then open 

 

if it will not help u . U have to create one calculated column to replace the old column with same name.

 

 

Column = var Month_Name = FORMAT( 'date_field'[fecha]; "mm" )

 

return switch ( true(),

Month_Name=1, "Jan in Spanish"

.

.

.

etc

 

)

 

 

View solution in original post

10 REPLIES 10
Anonymous
Not applicable

Hello,

For me, best solution to change language for Format function is to change the culture of the tabular model in pbix file.

To do this, you can follow this article on sqlbi : https://www.sqlbi.com/articles/changing-the-culture-of-a-power-bi-desktop-file/.

Thanks to Marco Russo.

 

Baskar
Resident Rockstar
Resident Rockstar

Two ways 

 

1. Go to file > options and settings > options > regional setting > select spanish

Save and close it . Then open 

 

if it will not help u . U have to create one calculated column to replace the old column with same name.

 

 

Column = var Month_Name = FORMAT( 'date_field'[fecha]; "mm" )

 

return switch ( true(),

Month_Name=1, "Jan in Spanish"

.

.

.

etc

 

)

 

 

View solution in original post

EmirSc
Frequent Visitor

thanks that worked for me, wish you could define the language schema like in sql so all the results use that schema.Smiley Happy

dahti00
Frequent Visitor

Hi @Baskar.

Just wanted to correct on your code example and give some variations to people.

In Power BI using comma as shown in example gives you an error, use semicolon ("Date" is the date column aka FulldateAlternateKey):

Normal Switch statement in-line


SpanishMonth = SWITCH(MONTH([Date]); 1; "Enero"; 2; "Febrero"; 3; "Marzo"; 4; "Abril"  
               ; 5; "Mayo"; 6; "Junio"; 7; "Julio"; 8; "Agosto"  
               ; 9; "Septiembre"; 10; "Octubre"; 11; "Noviembre"; 12; "Diciembre"  
               ; "Unknown month number" )

Other examples passing string or integer with variable, note that an error will be flagged If you don't use the same data type in the switch comparison:

Switch on String Value


SpanishMonth2= var Month_Name = FORMAT([Date]; "m")                      
//"mm" returns "01", "02" etc. which will not compare to string value "1", "2" etc.

return switch ( true();
Month_Name="1"; "Enero";
Month_Name="2"; "Febrero")

Switch on Integer Value

SpanishMonth3 = var Month_Name = MONTH([Date])  //MONTH returns Integer.

return switch ( true();
Month_Name=1; "Enero";
Month_Name=2; "Febrero")

For combined month and year column, I used @dahti00 method (thanks!) as follows:

  1. Created RussianMonth column as above.
  2. Created Year column from Date column.
  3. Created Russian month and year column: 

 

RUS_Month_Year = COMBINEVALUES(" ", [RussianMonth], [Year])

 

Thanks for the info. The regional setting didn't work. So I have used a calculated column.

Mes = SWITCH(MONTH('table[fecha]);1;"Enero";2;"Febrero";3;"Marzo";4;"Abril";5;"Mayo";6;"Junio";7;"Julio";8;"Agosto";9;"Septiembre";10;"Octubre";11;"Noviembre";12;"Diciembre")

The FORMAT() function in DAX works a lot like the TEXT() function in Excel - maybe this helps http://excelribbon.tips.net/T011782_Specifying_a_Language_for_the_TEXT_Function.html

Austin is VP Operations at PowerPivotPro and a professional self-service enthusiast 🙂
Anonymous
Not applicable

Hello,

I am using SSAS, and I swear to god, I am using different language codes and the month always appears in Polish.

Cool , Let me know if any help

sananthv
Helper II
Helper II

In the old report go to file > options and settings > options > regional setting > select spanish, save, close desktop and re-open and try.

 

Go to data tab in the frnt end, select the field and make the forma you want.

 

I had this issue between US and UK dates. When i did this for some strange reason it worked 🙂

 

Helpful resources

Announcements
PBI User Groups

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group!

MBAS on Demand

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

July 2021 Update 768x460.png

Check it out!

Click here to read more about the July 2021 Updates

Top Solution Authors
Top Kudoed Authors