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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
jnnilesh29
Helper III
Helper III

Line Chart: Solid lines up to certain dates and then Dotted line

Hello guys,

 

I have a line chart as follows and wondering if I can get solid green line (Achieved progress) up to a certain date (let's say November 30, 2021) and then followed by dotted green line (Forecast progress)?

 

jnnilesh29_1-1638543642130.png

 

Any help is appreciated.

Thanks,

Nilesh

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @jnnilesh29 

Please correct me if I wrongly understand your question .

In your sample, use a certain date 2021-11-30 as the separation point , the value of Achieved progress display as a solid green line and the value of Forecast progress display as a dotted green line .You can realize the requirements by creating measures .I create a sample , you can make a reference .

(1)Create two measures to return the value of Achieved progress before the certain date and the value of Forecast progress after the certain date .

achieved progress before = CALCULATE(SUM('Table'[Achieved progress]),FILTER('Table','Table'[Date]<=DATE(2021,11,30)))
forecast progress after = CALCULATE(SUM('Table'[Forecast progress]),FILTER('Table','Table'[Date]>=DATE(2021,11,30)))

Ailsamsft_0-1638929843856.png

(2)Add a Line chart ,and put these two measures in Values and Secondary values ,date in Axis .

Ailsamsft_1-1638929843858.png

(3)In visual format , turn on Customize series in Shapes . Choose the measure [forecast progress after] and set the Line style to Dotted . Change the line color in Data colors

Ailsamsft_2-1638929843859.png

Ailsamsft_4-1638930032636.png

The final result is as shown :

Ailsamsft_3-1638929843860.png

I have attached my pbix file , you can refer to it .

 

Best Regards

Community Support Team _ Ailsa Tao

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

Hi @jnnilesh29 

Please correct me if I wrongly understand your question .

In your sample, use a certain date 2021-11-30 as the separation point , the value of Achieved progress display as a solid green line and the value of Forecast progress display as a dotted green line .You can realize the requirements by creating measures .I create a sample , you can make a reference .

(1)Create two measures to return the value of Achieved progress before the certain date and the value of Forecast progress after the certain date .

achieved progress before = CALCULATE(SUM('Table'[Achieved progress]),FILTER('Table','Table'[Date]<=DATE(2021,11,30)))
forecast progress after = CALCULATE(SUM('Table'[Forecast progress]),FILTER('Table','Table'[Date]>=DATE(2021,11,30)))

Ailsamsft_0-1638929843856.png

(2)Add a Line chart ,and put these two measures in Values and Secondary values ,date in Axis .

Ailsamsft_1-1638929843858.png

(3)In visual format , turn on Customize series in Shapes . Choose the measure [forecast progress after] and set the Line style to Dotted . Change the line color in Data colors

Ailsamsft_2-1638929843859.png

Ailsamsft_4-1638930032636.png

The final result is as shown :

Ailsamsft_3-1638929843860.png

I have attached my pbix file , you can refer to it .

 

Best Regards

Community Support Team _ Ailsa Tao

themistoklis
Community Champion
Community Champion

@jnnilesh29 

 

You should create 2 measures per line (one for solid and one for dotted).

 

See link below:

https://community.powerbi.com/t5/Desktop/Line-Chart-Is-it-possible-to-have-half-of-the-chart-as-soli...

 

Hi @themistoklis ,

 

I did create two measure per the link you shared. However, it is giving me some weird results. Please see the below graph and measures: 

jnnilesh29_0-1638544486742.pngjnnilesh29_1-1638544501212.pngjnnilesh29_2-1638544513963.png

 

Please help. 

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors