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!View all the Fabric Data Days sessions on demand. View schedule
If I try to change the GL Period to DATE in Power Query Editor in Power BI it changes May-19 to 5/19/2020 and it should change it to 5/1/2019. After I figure this out, then I need to figure out how to get the dates to sort properly. Jan-2019, Feb-20
Solved! Go to Solution.
Hi @Jdokken
try:
Date.FromText( "1-" & "May-19" )
You need a sort-column which you can sort the text columns by:
Date.Year([Custom]) * 100 + Date.Month([Custom])
Provided that [Custom] returns a proper date-format.
Imke Feldmann (The BIccountant)
If you liked my solution, please give it a thumbs up. And if I did answer your question, please mark this post as a solution. Thanks!
How to integrate M-code into your solution -- How to get your questions answered quickly -- How to provide sample data -- Check out more PBI- learning resources here -- Performance Tipps for M-queries
Hi @Jdokken ,
As @ImkeF said, Date.FromText should work well. Then we can sort the table by date.
Date.FromText( "1-" & [date])
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45W8k2s1DW0VIrViVbyKs2DMd1Sk8DMWAA=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type text) meta [Serialized.Text = true]) in type table [date = _t]),
#"Added Custom" = Table.AddColumn(Source, "Custom", each Date.FromText( "1-" & [date]))
in
#"Added Custom"
Hi @Jdokken
try:
Date.FromText( "1-" & "May-19" )
You need a sort-column which you can sort the text columns by:
Date.Year([Custom]) * 100 + Date.Month([Custom])
Provided that [Custom] returns a proper date-format.
Imke Feldmann (The BIccountant)
If you liked my solution, please give it a thumbs up. And if I did answer your question, please mark this post as a solution. Thanks!
How to integrate M-code into your solution -- How to get your questions answered quickly -- How to provide sample data -- Check out more PBI- learning resources here -- Performance Tipps for M-queries
Awesome! Thank you!
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 11 | |
| 8 | |
| 6 | |
| 5 | |
| 3 |