Forum Discussion

Jacob_'s avatar
Jacob_
Frequent Visitor
5 years ago
Solved

generate data for each month

hello there,   I have some Excel data for many processes on the year level just like below: now I need to generate the same data for each process on the month level for each year in below ma...
  • Anonymous's avatar
    Anonymous
    5 years ago
    let
        Origine = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WclTSUTIFYiMDIwOlWJ1oJSeQgDFExFApNhYA", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [pr = _t, v = _t, y = _t]),
        #"Modificato tipo" = Table.TransformColumnTypes(Origine,{{"y", Int64.Type}}),
        #"Aggiunta colonna personalizzata" = Table.AddColumn(#"Modificato tipo", "months", each List.Transform({1..12},(m)=> #date([y],m,1))),
        #"Tabella months espansa" = Table.ExpandListColumn(#"Aggiunta colonna personalizzata", "months")
    in
        #"Tabella months espansa"