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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
v-yangliu-msft
Community Support
Community Support

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
v-yangliu-msft
Community Support
Community Support

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

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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