cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Helper II
Helper II

Line Chart with a two axis

Hi guys, 

 

Is it possible to create a line chart like this?

dmkblesser_0-1610340140758.png

 

show data label for the first axis and show one or even don't show the data label for the second one in this case is 85%? 

 

Or any custom visuals can do that? 

 

Thanks in advance for any suggestions. 

1 ACCEPTED SOLUTION

Hi @dmkblesser ,

 

Sorry for the late reply. Currently, the best display method can only be as follows. Modifying the measure in Data labels will not display the value of the second data label.

v-henryk-mstf_0-1611046648443.png

 

Best Regards,
Henry

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

12 REPLIES 12
Microsoft
Microsoft

Hi @dmkblesser ,


It can be achieved directly by creating a line chart. According to your request, I created a similar data model, and then just add a straight line to the max point in Analytics.

v-henryk-mstf_0-1610502401604.jpeg

v-henryk-mstf_1-1610502411946.png

 

It should be noted that "show items with no data" is checked, otherwise the following error will occur.

v-henryk-mstf_2-1610502420612.png

v-henryk-mstf_3-1610502427608.png

If the problem is still not resolved, please provide detailed error information and let me know immediately, looking forward to your reply.


Best Regards,
Henry


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

Hi Henry, also I don't see any analytics option for line and clusted column chart and line and stacked column chart. How can we draw the similar charts with those two? (a horizontal line with column charts)

Thank you!

Hi @Syndicate_Admin  @dmkblesser ,

 

You can check if my reply just now can help you solve the problem.

 

If the problem is still not resolved, please provide detailed error information and let me know immediately, looking forward to your reply.


Best Regards,
Henry


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

Hi Henry,

Thanks for your reply. It looks closer to what I want to achieve. However, in my example, the 85% is a separate measure. it is in a different data set than the main line charts. Is it still possible?

Hi @dmkblesser ,


This is feasible. The following is my test: I created a measure, added it to the value of the visual, and showed the same result.

v-henryk-mstf_0-1610528339178.pngv-henryk-mstf_1-1610528346275.png

 

Here is the sample pbix file.


If you still can’t solve problem, can you provide relevant sample pbix files or detailed data and information so that I can do an accurate test. Looking forward to your reply.


Best Regards,
Henry


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

Hi Henry, but this shows 85 mulitiple times for the horizontal line. All I'm asking for is show both lines but show all the data labels for the curved line and only one data label for the straight line.

The max line method works if we can add another measure to repesent the straight line. Hopefully this makes sense

@v-henryk-mstf Sorry Henry, the problem is not solved. Please see the above reply. 

 

Thanks 

Hi @dmkblesser ,

 

Sorry for the late reply. Currently, the best display method can only be as follows. Modifying the measure in Data labels will not display the value of the second data label.

v-henryk-mstf_0-1611046648443.png

 

Best Regards,
Henry

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

Helper II
Helper II

Hi @amitchandak, my apologise that I didn't make my question clear. 

 

The screenshot I put there has two lines on the chart. We can see that the data label shows up for each date on the line chart. However for that horizontal line (the green line with value 85%), it only show 85% once, it won't show 85% for each date. Is there a way to achieve that? What happened on my own chart is it shows 85% for each date. 

Thank you 

Helper II
Helper II

Hi @amitchandak, thanks for your reply. Unfortunately mulitple images is not what I'm looking for. The screenshot is actually one chart based on date. It breaks in between because there are some 0 values, and maybe that makes you think it is mulitple image. 

@dmkblesser , Line visual with Categorical Axis Type.

A measure like If([Measure] =0, blank(), measure)

 

Axis_type.png



Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
Dashboard of My Blogs !! YouTube Channel !! Connect on Linkedin

Proud to be a Super User!

Super User IV
Super User IV

@dmkblesser , One of the option is small multiple

https://powerbi.microsoft.com/en-us/blog/announcing-small-multiples-public-preview/

Video -https://www.youtube.com/watch?v=a7PIApvjmVw

 

You have option enable seconday Axis on Line - That Might not fit here - https://docs.microsoft.com/en-us/power-bi/visuals/power-bi-visualization-combo-chart#create-a-combo-...

 

Or you may to explore the Custom Visual - https://appsource.microsoft.com/en-us/marketplace/apps?product=power-bi-visuals

 

 



Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
Dashboard of My Blogs !! YouTube Channel !! Connect on Linkedin

Proud to be a Super User!

Helpful resources

Announcements
secondImage

Congratulations!

We are excited to announce the Power BI Super Users!

Wave Release 2

Check out the updates in Power BI.

Overview of Power BI 2020 release wave 2!

Microsoft Ignite

Microsoft Ignite

Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!

secondImage

The largest Power BI virtual conference

100+ sessions, 100+ speakers, Product managers, MVPs, and experts. All about Power BI. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors