Forum Discussion

spider_Monkey's avatar
4 years ago
Solved

Visualizing Data values between dates

Hello Friends,

 

I am trying to build out a visulization that will show me how many reports (Reports Goal) between the time periods below.

So one example would be between 1/2-1/15 there would be 172 reports that were due. What I would like to do is have a line chart that shows the ebs and flows of what the goals are over time. 

 

So almost like a Gantt Chart but not ha! 

 

PersonStartEndReports CompletedReports Goal
Macgyver1/1/20221/15/2022110100
Johnson1/2/20221/15/20226280
Johnson1/4/20222/1/20226565
Grace1/15/20222/4/202280110
Sosa5/3/20225/30/2022100125
Sosa4/6/20225/1/2022100100
Grace4/1/20225/18/20226565
Macgyver3/4/20223/15/20221223

10 Replies

  • let
        Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("bdDNCsMgDAfwd8m5YIwf+AaDwU47igcpZTtVaGGwt5/a2kjXS4j4U//Re3jE8fX9TAsMIIUUhERba45eYqmIEAYP9/Se1zRXQ1fcluL+sW6A+BlrtlLsbYnjdLqL+JTDPUqxz7TGvDRCte3c4pEGqyXTWy0sW3mi+2wtgmaQrbtK232b4pCq/7Y6gIIQfg==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Person = _t, Start = _t, End = _t, #"Reports Completed" = _t, #"Reports Goal" = _t]),
        #"Changed Type" = Table.TransformColumnTypes(Source,{{"Start", type date}, {"End", type date}}),
        #"Added Index" = Table.AddIndexColumn(#"Changed Type", "Index", 0, 1, Int64.Type),
        #"Unpivoted Other Columns" = Table.UnpivotOtherColumns(#"Added Index", {"Person", "Reports Completed", "Reports Goal", "Index"}, "Attribute", "Value"),
        #"Changed Type1" = Table.TransformColumnTypes(#"Unpivoted Other Columns",{{"Reports Completed", Int64.Type}, {"Reports Goal", Int64.Type}})
    in
        #"Changed Type1"

     

    You have multiple intervals per person, so I had to add an index column.

     

     

    • spider_Monkey's avatar
      spider_Monkey
      Icon for Helper I rankHelper I

      lbendlin Alright so I added an indexed column, but this might be a dumb question...This is off a table that I build so I can't see it in the query editor.

      • lbendlin's avatar
        lbendlin
        Icon for Super User rankSuper User

        Not sure what you mean.  Unless you connect to a dataset or dataflows you should be able to see the query in the query editor.

    • spider_Monkey's avatar
      spider_Monkey
      Icon for Helper I rankHelper I

      lbendlin Can you send a screen shot of the table view to see how it looks after the edit to the query editor?

  • So I built a new table outside of query editor based off data from anohter table. 

    • lbendlin's avatar
      lbendlin
      Icon for Super User rankSuper User

      As long as you included the index column there you are good. Doesn't matter where in the ETL process you do it.

      • spider_Monkey's avatar
        spider_Monkey
        Icon for Helper I rankHelper I

        Okay, so I am using union to unpivot this and I should be able to get there. Do you happen to have a screen shot of the visualizations pane from the graph you provided?