cancel
Showing results for
Did you mean:
Frequent Visitor

Joining lines in line chart

Hi all 🙂

I'm trying to create a visual where 2 seperate lines join. Currently im at the following stage:

We can see the blue line does not connect to the red line.

The lines are based off the values in the following table:

Ideally I think i'd need to take the value from "MaxRawNegativeNew" for the 08/04/21 and replicate it in the "MaxRawPositiveNew" column in the corresponding date.

I'm just not sure how to achieve this, from the research I've done thus far I'm guessign it involves "FIRSTNONBLANK" but my knowledge of implementing this is limited.

1 ACCEPTED SOLUTION
Super User

Try creating a measure with the sum of both columns (or sum the measures if you have them):

Full line = SUM(Table[Column 1] + SUM(Table[Column 2])

Create a measure for the blue line (or use the corresponding measure):

Blue Line = SUM(Table[Column1])

add both measures to the line visual (Blue line measure on top in the values bucket)

In doing so, you are also helping me. Thank you!

Proud to be a Super User!

3 REPLIES 3
Community Support

Create two measures and add the date filter conditions.

Set the type of x-axis  to categorical.

``Measure = CALCULATE(MAX(financials[ Sales]),FILTER(financials,financials[Date]<>DATE(2014,4,1)&&financials[Date]<>DATE(2014,5,1)))``
``Measure 2 = CALCULATE(MAX(financials[ Sales]),FILTER(financials,financials[Date]=DATE(2014,4,1)||financials[Date]=DATE(2014,5,1)))``

Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Super User

Try creating a measure with the sum of both columns (or sum the measures if you have them):

Full line = SUM(Table[Column 1] + SUM(Table[Column 2])

Create a measure for the blue line (or use the corresponding measure):

Blue Line = SUM(Table[Column1])

add both measures to the line visual (Blue line measure on top in the values bucket)

In doing so, you are also helping me. Thank you!

Proud to be a Super User!

Super User

You cannot do this in DAX measures. You will need to add the two missing data points in Power Query  or a calculated table and append them to the original data.

Please provide sanitized sample data that fully covers your issue. Paste the data into a table in your post or use one of the file services.

Announcements

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

Charticulator Design Challenge

Put your data visualization and design skills to the test! This exciting challenge is happening now through May 31st!

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

Check it out!

Mark your calendars and join us on Thursday, May 26 at 11a PDT for a great session with Ted Pattison!

Top Solution Authors
Top Kudoed Authors