Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Hello - this is how you can do it.
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("bdK7DcAgEATRXoiRYBfwpxbk/tuwnHonneiebvcus6m5e5RaVu/lqV9yppFpZlqZjkxnpivTnUkdGtwvAAgEAoLAIEAIFAKGwGFwmP4ADoPD4DA4DA6Dw+AwOEY4Vs5p/eb0vA==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Date = _t, #"Monthly Spend" = _t]),
#"Changed Type" = Table.TransformColumnTypes(Source,{{"Date", type date}, {"Monthly Spend", Int64.Type}}),
#"Added Custom" = Table.AddColumn(#"Changed Type", "DaysInMonth", each Date.DaysInMonth([Date]), Int64.Type),
#"Inserted Division" = Table.AddColumn(#"Added Custom", "Daily Spend", each [Monthly Spend] / [DaysInMonth], Currency.Type)
in
#"Inserted Division"