cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Mesh Frequent Visitor
Frequent Visitor

Line graph not joining points

I have created a line graph with data along a time point (set by text, not an actual date; i.e. week 1, week 2 etc), but if a series does not have a measurement for a time point that other series do have, the line breaks and re-starts again.

 

See the pictures below.

 

What I would like is for all points from a series to be joined until the last data point on that series.

 

Cont Line.PNGThis line is continuousBroken line.PNGThe pink line has a data point at a time that the grey line does not, so the grey line breaks rather than joing with a line across the points.

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Line graph not joining points

Hi @Mesh ,

 

One sample for your reference, please check the following steps as below.

 

1. Insert an index by week in power query like this.

 

let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("Xc47EsAgCATQu1BbBNSYnMWxtMoBcv24foha6Mw+FIiR3pwfJkNcL0qmkZQkoEXYzoLgdhCZBWXbug/yqJd3TuXsElQCYjle5Rr7/N9u9MUADqvVgaLGx75nlb5o+gA=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type text) meta [Serialized.Text = true]) in type table [week = _t, value1 = _t, value2 = _t]),
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"week", type text}, {"value1", Int64.Type}, {"value2", Int64.Type}}),
    #"Added Index" = Table.AddIndexColumn(#"Changed Type", "Index", 1, 1),
    #"Added Custom" = Table.AddColumn(#"Added Index", "Custom", each Text.Combine(List.RemoveNulls(List.Transform(Text.ToList([week]),each if Value.Is(Value.FromText(_), type number) then _ else null)))),
    #"Changed Type1" = Table.TransformColumnTypes(#"Added Custom",{{"Custom", Int64.Type}})
in
    #"Changed Type1"

1.PNG

 

2. Then apply the query and we can create measures as below.

 

sumvalue1 = SUM('Table'[value1])
value2sum = var minind = CALCULATE(MIN('Table'[Custom]),FILTER(ALLSELECTED('Table'),[sumvalue1] = BLANK()))
var ind = minind-1
return
CALCULATE(SUM('Table'[value2]),FILTER('Table','Table'[Custom]>=ind))

2.PNG

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
Community Support Team
Community Support Team

Re: Line graph not joining points

Hi @Mesh ,

 

One sample for your reference, please check the following steps as below.

 

1. Insert an index by week in power query like this.

 

let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("Xc47EsAgCATQu1BbBNSYnMWxtMoBcv24foha6Mw+FIiR3pwfJkNcL0qmkZQkoEXYzoLgdhCZBWXbug/yqJd3TuXsElQCYjle5Rr7/N9u9MUADqvVgaLGx75nlb5o+gA=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type text) meta [Serialized.Text = true]) in type table [week = _t, value1 = _t, value2 = _t]),
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"week", type text}, {"value1", Int64.Type}, {"value2", Int64.Type}}),
    #"Added Index" = Table.AddIndexColumn(#"Changed Type", "Index", 1, 1),
    #"Added Custom" = Table.AddColumn(#"Added Index", "Custom", each Text.Combine(List.RemoveNulls(List.Transform(Text.ToList([week]),each if Value.Is(Value.FromText(_), type number) then _ else null)))),
    #"Changed Type1" = Table.TransformColumnTypes(#"Added Custom",{{"Custom", Int64.Type}})
in
    #"Changed Type1"

1.PNG

 

2. Then apply the query and we can create measures as below.

 

sumvalue1 = SUM('Table'[value1])
value2sum = var minind = CALCULATE(MIN('Table'[Custom]),FILTER(ALLSELECTED('Table'),[sumvalue1] = BLANK()))
var ind = minind-1
return
CALCULATE(SUM('Table'[value2]),FILTER('Table','Table'[Custom]>=ind))

2.PNG

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Helpful resources

Announcements
Can You Solve These Challenge

Challenge: Can You Solve These?

Find out how to participate in the first Power BI 'Can You Solve These?' challenge.

Community News & Announcements

Community News & Announcements

Get your latest community news and announcements.

Virtual Launch Event

Microsoft Business Applications October Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

Community Kudopalooza

Win Power BI Swag with Community Kudopalooza!

Each week, complete activities and be qualified in the drawing for cool Power BI Swag.

Users Online
Currently online: 240 members 2,360 guests
Please welcome our newest community members: