Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
Dear all, I have a table with two columns which shows the exchange rate of two currencies per month. The raw data is like this (spanish):
MonthYear | ER |
Ene19 | 3.332 |
Feb19 | 3.304 |
Mar19 | 3.320 |
Abr19 | 3.309 |
May19 | 3.376 |
Jun19 | 3.290 |
Jul19 | 3.310 |
Ago19 | 3.398 |
Sep19 | 3.350 |
Oct19 | 3.400 |
Nov19 | 3.314 |
Dic19 | 3.378 |
Ene20 | 3.460 |
Feb20 | 3.384 |
However when I upload it in Power Query the table becomes like this, sort by text and I don't know how to sort it back in PowerQuery:
MonthYear | ER |
Ene19 | 3.332 |
Abr19 | 3.309 |
Ago19 | 3.398 |
Dic19 | 3.378 |
Ene20 | 3.460 |
Feb19 | 3.304 |
Feb20 | 3.384 |
Jul19 | 3.310 |
Jun19 | 3.290 |
Mar19 | 3.320 |
May19 | 3.376 |
Nov19 | 3.314 |
Oct19 | 3.400 |
Sep19 | 3.350 |
The database is in the following link https://estadisticas.bcrp.gob.pe/estadisticas/series/mensuales/resultados/PN01215PM/html
Thanks in advance,
Joao
Solved! Go to Solution.
@JoaoMS
You would need to replace the Spanish to English first, because the Power Bi cannot read and sort month from different languages.
After all the values are displayed in "19-Jan","19-Feb". You can just change the Data Type from text to date, then sort.
Paul Zheng
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@JoaoMS
You would need to replace the Spanish to English first, because the Power Bi cannot read and sort month from different languages.
After all the values are displayed in "19-Jan","19-Feb". You can just change the Data Type from text to date, then sort.
Paul Zheng
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, you need to create an Custom Column with a format date of your string:
Example: "1-" & Text.Start([Fecha],3) & "-" & Text.End([Fecha],2)
After that Parse in Date Menu.
Its possible that fail with Months in Spanish so replace before parse: Example: 1-Ene-96 to 1-Jan-96
Finally Sort by this new column
Regards
Victor
Thank you for the quick response, but it seems that is DAX, is it possible to do the same in Power Query?
Regards.
Refer:https://docs.microsoft.com/en-us/powerquery-m/date-totext
example
Date.ToText(#date(2010, 12, 31), "yyyyMM")
User | Count |
---|---|
98 | |
76 | |
69 | |
53 | |
27 |