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

July 28 - August 9 | Final Round of the Power BI Dataviz World Championships. This is your chance. Learn more

Reply
Victormar
Helper V
Helper V

Line chart with different patterns

Hello community,

 

I reach out to you all because I am trying to create a line chart having the same line with different patterns.

We have some data that we generated, and some that we get from machines, resulting in a mileage line altogether; The idea would be to simulate 1 line, where the generated data would be a dotted line and the non generated a normal line.

We have a columnt to identify wether the data is generated or not using 1 (generated) or 0.

 

I created a couple of measures, but due to filtering the lines don't overlay ( I did it using variables because first I tried without and it didn't work either, so just trying something different):

 

c_EnergyConsumptionGenerated =
var generated = FACT_Readings[EGC_IS_GENERATED] = 1
var result = IF (
generated, FACT_Readings[c_EnergyConsumption]
)
return result
 
c_EnergyConsumptionNOTGenerated =
var not_generated = FACT_Readings[EGC_IS_GENERATED] = 0
var result = IF (
not_generated, FACT_Readings[c_EnergyConsumption]
)
return result
 
c_EnergyConsumption is the main column where we calculate the Energy, then we calculate the average of it as a measure and add it to the graph. In my mind I could create these two measures to highlight the different points, but as Power BI would joint all the data points in a line chart, the result would look odd, and not overlaid:
 
Victormar_0-1662455442918.png

Red is generated, and black is not.

 

Thanks in advance for any help, have a nice day!

2 REPLIES 2
Victormar
Helper V
Helper V

Hi @Hei_aQing , the expected output would be 1 line in which some parts are dotted and others are straight, depending on the data.

My idea was to overlay the two lines to do it, but as my filter is a column "IS_FILTERED" that means it excludes some of the data points, resulting in different lines.

Didn't share any sample data because I guess it doesn't matter, sample data would serve to try it out.

 

Thanks for your time 🙂

Hei_aQing
Helper I
Helper I

HI @Victormar 

 

What is your expected output? Could you consider providing some sample data?

Helpful resources

Announcements
Fabric Community Sticker Design Challenge Barcelona Carousel

Fabric Community Sticker Challenge - Barcelona 2026

If you love stickers, then you will definitely want to check out our community sticker challenge, Barcelona edition!

July Power BI Update Carousel

Power BI Monthly Update - July 2026

Check out the July 2026 Power BI update to learn about new features.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Top Solution Authors