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! Request now

Reply
hylosko
Helper III
Helper III

Line chart intermittent line

Hello power bi experts !

 

It is any possibility to do line chart like in my picture ? 

 

W - it is week, for example 1,2,3,4,5

hylosko_0-1645599991520.png

 

1 ACCEPTED SOLUTION

Hi @hylosko ,

 

According to the documentation, we can only set predicted values for incremental numeric or date x-axis.

 

Introducing new forecasting capabilities in Power View for Office 365 :

Forecast is available for line charts only. The x-axis value needs to have a date/time format or be a uniformly increasing whole number.

  • It can’t contain text or decimal numbers.
  • Sometimes x-axis values appear to be dates, but they’re actually formatted as text. They won’t work for forecasting.

 

If you still want the x-axis of the line chart to contain text, then you need to create measures for the forecast values. For example, in my example data, I used a simple linear regression equation to predict the value( [Simple linear regression] ), which means that the measure is equivalent to the FORECAST function in Excel. You can use other methods for prediction as needed.

 

Measure = 
VAR lastnotblankweek =
    CALCULATE (
        MAX ( Dates[WeekNum] ),
        FILTER ( ALLSELECTED ( 'Table' ), [SumValue] <> BLANK () )
    )
RETURN
    IF (
        MAX ( Dates[WeekNum] ) = lastnotblankweek,
        [SumValue],
        IF ( [SumValue] = BLANK (), [Simple linear regression] )
    )

vkkfmsft_2-1646120656236.png

image.png

 

If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
Winniz
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

4 REPLIES 4
amitchandak
Super User
Super User

@hylosko , You need to have two measures, One line might not serve the purpose

 

if you are looking for forecasting, there is an option in analytics in visualization property pane

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

and second question is any possibility to do  second measure like the dotted line

 ?

Hi @hylosko ,

 

According to the documentation, we can only set predicted values for incremental numeric or date x-axis.

 

Introducing new forecasting capabilities in Power View for Office 365 :

Forecast is available for line charts only. The x-axis value needs to have a date/time format or be a uniformly increasing whole number.

  • It can’t contain text or decimal numbers.
  • Sometimes x-axis values appear to be dates, but they’re actually formatted as text. They won’t work for forecasting.

 

If you still want the x-axis of the line chart to contain text, then you need to create measures for the forecast values. For example, in my example data, I used a simple linear regression equation to predict the value( [Simple linear regression] ), which means that the measure is equivalent to the FORECAST function in Excel. You can use other methods for prediction as needed.

 

Measure = 
VAR lastnotblankweek =
    CALCULATE (
        MAX ( Dates[WeekNum] ),
        FILTER ( ALLSELECTED ( 'Table' ), [SumValue] <> BLANK () )
    )
RETURN
    IF (
        MAX ( Dates[WeekNum] ) = lastnotblankweek,
        [SumValue],
        IF ( [SumValue] = BLANK (), [Simple linear regression] )
    )

vkkfmsft_2-1646120656236.png

image.png

 

If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
Winniz
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

Can you please show sample how i can do that with any two measures ? 

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

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!

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