Forum Discussion

SoLoNOx's avatar
SoLoNOx
New Member
5 years ago
Solved

Roster Planning

Hello Folks,   I'd like to create an interactive planning where people are assigned to specific tasks with random duration.   My data are stored in an Excel Spreadsheet (people, tasks, start date...
  • v-jingzhang's avatar
    v-jingzhang
    5 years ago

    Hi SoLoNOx , do you want something like this?

    To achieve this, you need to transform the data in Power Query Editor first. Try below codes in Advanced Editor and you will get a new column Dates. Then put this Dates column in a matrix visual. Here is a PBIX file for reference.

    let
        Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WilDSUTIyMDLUNdQ1QTAtgExnH1dHP08/d6VYnWilSIScJYJpaABkhzsGe8CURSHJWSDYRqZAdoCjp18IWGEsAA==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [People = _t, #"Start Date" = _t, #"End Date" = _t, Job = _t]),
        #"Changed Type" = Table.TransformColumnTypes(Source,{{"People", type text}, {"Start Date", type date}, {"End Date", type date}, {"Job", type text}}),
        #"Added Custom" = Table.AddColumn(#"Changed Type", "Dates", each List.Dates([Start Date], Duration.Days([End Date]-[Start Date])+1, #duration(1, 0, 0, 0))),
        #"Expanded Custom" = Table.ExpandListColumn(#"Added Custom", "Dates"),
        #"Changed Type1" = Table.TransformColumnTypes(#"Expanded Custom",{{"Dates", type date}})
    in
        #"Changed Type1"

    Kindly let me know if this helps.
    Community Support Team _ Jing Zhang
    If this post helps, please consider Accept it as the solution to help other members find it.