Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago

New table - list between two dates

Dear Power BI users, 

 

I am building a workload/capacity KPI and need help. 

 

See the current table : 

 

 

I need to create a new table, like this one below::

 

 

 

As you can, see I would like to have a table showing each period (WW) between the different gates. 

 

Could you help me please?

 

Thank you, 

7 Replies

    • Anonymous's avatar
      Anonymous
      Not applicable

      amitchandak , I tried the link above but I don't think it will work for my request. There was an error in by first screenshot. There is also project I/D on column 1 :

       

       

      Is there a way to list all periods associated with a project/ressource and showing the hrs/wk for each?

       

       

  • Greg_Deckler's avatar
    Greg_Deckler
    Community Champion

    Anonymous Like this?

    let
        Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMlTSUfLKz8gDUkYGRoaGxiAGlGNsCWSYQThGRsZKsTrRYDnv1LyUokSYIhMgwxSqyABknDmUY2gA1gEyMTIxLy8zORuqBazKEKoKrN8SyjE1AmsxQbfEFGStMUyHBYJjDHJWLAA=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Project = _t, #"Resource Name" = _t, #"Gate A" = _t, #"Hrs A-B" = _t, #"Gate B" = _t, #"Hrs A-C" = _t, #"Gate C" = _t]),
        #"Changed Type" = Table.TransformColumnTypes(Source,{{"Resource Name", type text}, {"Gate A", Int64.Type}, {"Hrs A-B", Int64.Type}, {"Gate B", Int64.Type}, {"Hrs A-C", Int64.Type}, {"Gate C", Int64.Type}}),
        #"Unpivoted Columns" = Table.UnpivotOtherColumns(#"Changed Type", {"Project", "Resource Name", "Hrs A-B", "Hrs A-C"}, "Attribute", "Value"),
        #"Removed Columns" = Table.RemoveColumns(#"Unpivoted Columns",{"Attribute"}),
        #"Renamed Columns" = Table.RenameColumns(#"Removed Columns",{{"Value", "Period"}})
    in
        #"Renamed Columns"