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
Adore
Regular Visitor

Line Chart Style

Hi, I'm new to Power BI and I know there's still a lot to learn. I'm just doing some basic visual to get used to the tool. I have a line chart with Budget vs Forecast by month. It looks like the first image below. The black line is the budget and the blue line is the actual for the past period and forecast for the future periods. Is there a way to have different line style for actual and forecast, for example, solid line for actual and dash for future forecast, like the second image?

 

 Bugdet vs ActualBugdet vs ActualLine chart 2.JPG

 

4 REPLIES 4
v-jiascu-msft
Employee
Employee

Hi @Adore,

 

There is a workaround. It seems you have the forecast data in the source table. Maybe you can use two measures for each part. The two measures will join in a dot. Have a look at the sample below.

Measure 16 =
CALCULATE (
    SUM ( FactSales[SalesQuantity] ),
    FILTER ( DimDate, DimDate[Datekey] <= DATE ( 2008, 1, 31 ) )
)
Measure 17 =
CALCULATE (
    SUM ( FactSales[SalesQuantity] ),
    FILTER ( DimDate, DimDate[Datekey] >= DATE ( 2008, 1, 1 ) )
)

Line_Chart_Style

 

Best Regards,

Dale

Community Support Team _ Dale
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
vanessafvg
Super User
Super User

@Adore under your properties ie. the paintbrush on the right hand side of your pane, look for shapes, you can change the lines there





If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




Thanks. How would I have two different line style for the same series though? I need to have a solid line up to April and dash from May onwards.

@Adore as far as i know you can't do it for the same line, you will have to do two different lines however if they have the same amounts up until the point it becomes a forecast it should be easy to almost look like they are the same line... if that makes sense?





If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




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.

Top Solution Authors