Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
spider_Monkey
Helper I
Helper I

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
1 ACCEPTED SOLUTION

find the pbix attached

View solution in original post

10 REPLIES 10
spider_Monkey
Helper I
Helper I

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

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

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? 

lbendlin_0-1654701851554.png

Column = [Person] & [Index]
spider_Monkey
Helper I
Helper I

Thanks @lbendlin I'll play with adding this in, I appreciate your help! 

lbendlin
Super User
Super User

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.

 

lbendlin_0-1654650335206.png

 

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

find the pbix attached

@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.

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.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.