This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. We're covering it all. You won't want to miss it.
Learn moreDid you hear? There's a new SQL AI Developer certification (DP-800). Start preparing now and be one of the first to get certified. Register now
= Table.AddColumn(#"Renamed Columns", "Custom", each if Text.Length[MonthYear]=6 then "0"&[MonthYear] else [MonthYear])
When I write the formula for 1-2023 to 01-2023
Expression.Error: We cannot apply field access to the type Function.
Details:
Value=[Function]
Key=MonthYear
Solved! Go to Solution.
@Miss_A
This method should work for you.
Date.ToText(Date.FromText( "1-" & [Column1],"en-gb"), "MM-yyyy")
⭕ Subscribe and learn Power BI from these videos
⚪ Website ⚪ LinkedIn ⚪ PBI User Group
You forgot some parentheses
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMtQ1MjAyVorVATJh7FgA", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [MonthYear = _t]),
#"Added Custom" = Table.AddColumn(Source, "Custom", each if Text.Length([MonthYear])=6 then "0"&[MonthYear] else [MonthYear])
in
#"Added Custom"
@Miss_A
This method should work for you.
Date.ToText(Date.FromText( "1-" & [Column1],"en-gb"), "MM-yyyy")
⭕ Subscribe and learn Power BI from these videos
⚪ Website ⚪ LinkedIn ⚪ PBI User Group
Check out the April 2026 Power BI update to learn about new features.
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.