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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
atasgao
Helper II
Helper II

Single line in line chart with dotted and solid

Hello Everyone, 

 

I am trying to create a line which show my actual values - solid line and forecaste value - dotted line. Same as the picture below.

atasgao_0-1634805272638.png

 

But when I create it, it is having a gap same as the below picture. 

atasgao_1-1634805358291.png

atasgao_2-1634805395027.png

Would like to know how can I fix the issue. 

 

Thanks in advance

 

Thanks, 

Aakanksha 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi  @atasgao ,

I created some data:

vyangliumsft_0-1635215109609.png

Here are the steps you can follow:

1. Create measure.

M_ForeastAmountRemainingMonth =
SUM('Table'[ForeastAmountRemainingMonth])
M_ActualsAmountYTD = 
SUM('Table'[ActualsAmountYTD])
Measure-ActualsAmountYTD =
IF(
    MAX('Table'[date].[MonthNo])<10&&MAX('Table'[date].[MonthNo])>=9,CALCULATE(SUM('Table'[ForeastAmountRemainingMonth]),FILTER(ALL('Table'),[date].[MonthNo]=10)),[M_ActualsAmountYTD])

2. Place [M_ForeastAmountRemainingMonth] and [Measure-ActualsAmountYTD] in the line chart.

3. Result:

vyangliumsft_1-1635215109612.png

 

Best Regards,

Liu Yang

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

2 REPLIES 2
Anonymous
Not applicable

Hi  @atasgao ,

I created some data:

vyangliumsft_0-1635215109609.png

Here are the steps you can follow:

1. Create measure.

M_ForeastAmountRemainingMonth =
SUM('Table'[ForeastAmountRemainingMonth])
M_ActualsAmountYTD = 
SUM('Table'[ActualsAmountYTD])
Measure-ActualsAmountYTD =
IF(
    MAX('Table'[date].[MonthNo])<10&&MAX('Table'[date].[MonthNo])>=9,CALCULATE(SUM('Table'[ForeastAmountRemainingMonth]),FILTER(ALL('Table'),[date].[MonthNo]=10)),[M_ActualsAmountYTD])

2. Place [M_ForeastAmountRemainingMonth] and [Measure-ActualsAmountYTD] in the line chart.

3. Result:

vyangliumsft_1-1635215109612.png

 

Best Regards,

Liu Yang

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

amitchandak
Super User
Super User

@atasgao , Create a measure (only for forecast visual line) to have actual of last month added to forecast

or even forecast line can be actual + forecast, in-display it will display like you want

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors