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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss 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
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Fabric Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

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.