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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
bmayz
Regular Visitor

Line Chart - Is it possible to have half of the chart as solid lines and the other half as dotted?

 

Hi all,

 

I have to series appended which I am displaying in the same line chart. I would like to have the data for one of the series to display as solid lines and the other series to display as dotted lines. Is this possible? When I change the shape to dotted lines it seems to change both series.

 

This is what I am trying to achieve:

 

Wireframe.PNG

 

Thanks,

Beatriz

1 ACCEPTED SOLUTION

Hi @tringuyenminh92,

 

I am able to follow the approach without using a measure, just selecting each series. I only have 10 series for now:

Capture2.PNG

View solution in original post

14 REPLIES 14
jvffernandes1
New Member

I have another solution for this problem! I create another column with the same values of the first one (the one you want to show) like that (Note the "2500" value on formula is random, just so we do not overwrite the original value):

jvffernandes1_0-1674571451408.png

 

after this I go to the line chart and put all two Values and rename one of these values to " " (just an space):

jvffernandes1_1-1674571494126.png

So now I have this:

jvffernandes1_2-1674571528648.png

After that, I go to "Format>Data Colors" and select for " " measure the same color of the background. After that you go to "Format>shapes>Customize series" select the " " measure and select Line style = Dashed. When you apply these filters you can see an override on the line plot after "TODAY()":

jvffernandes1_3-1674571685173.png

 

Best regards,

tringuyenminh92
Memorable Member
Memorable Member

Hi @bmayz,

 

So far you could not customize x-axis like your expectation, but you could separate your measures to 2 parts (one measure for solid line and another for doted line).  Adjust them to same color and ensure they have intersection point.

 

Hi @tringuyenminh92,

 

Thanks so much for your response. I'm new to Power BI, so, not sure how to set the measures for dotted and solid lines. I know how to create the measures but not how to customize the line style for them.

 

Could you please share the steps for this?

 

Thanks,

Beatriz

Hi @bmayz,

 

Please ensure you are using the newest version of PBI Desktop. In the Format option -> Shape -> choose measure you want to adjust

 

 

Create 2 calculated measure:

 

rename measure with one spacerename measure with one spacem2.PNG

 

(To ensure there is no confusing for users, you could trick mesure name with one space)

 

1.PNG

2.PNG

 

 

This works great, thanks!

Hi @tringuyenminh92,

 

Could you please share a screenshot of your Fields pane?

 

Thanks!

Hi @bmayz,

 

Firstly choose your chart -> in Format area -> choose Shapes -> Choose measure you want to customize

1.PNG

 

Hope you got it now.

Thanks @tringuyenminh92,

 

I was actually referring to this pane:

Capture.PNG

 

Thanks for posting your solution, whoever, I'm not sure it will work for me as I need to display the products in the legend rather than the measure names. I have multiple lines, each of them will have half of them solid and the other half should be dotted.

 

Hi @bmayz,

 

It's just workaround. How many items you have? if there are a few items, you could follow this approach.Smiley Very Happy

Hi @tringuyenminh92,

 

I am able to follow the approach without using a measure, just selecting each series. I only have 10 series for now:

Capture2.PNG

Anonymous
Not applicable

Hi @bmayz,

 

Could you explain how you did this. What did you mean by selecting each series?

Anonymous
Not applicable

Hi @bmayz,

 

I know this is old, but could you explain this solution to me? I am only able to get this to work by following tringuyenminh92's method and creating separate measures for each line rather than doing a legend. Were you somehow able to do it using one measure and a legend? If so, how? Thanks.

Hey there,

 

I know this has been a while but were you able to figure it out?

 

I wasn't able to replicate without creating separate measures for each line and it does not really work if I have a legend along with it with a slicer.

 

Thanks

Hi @bmayz,

 

Great to hear the problem got resolved! Could you accept your reply above as solution to close this thread(it will help others who has similar issue easily find the answer)? Smiley Happy

 

Regards

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.