Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more
Hello,
please I need that the curve in green whenevr it is before the bar chart the type of the line is solid and when it is after the bar chart the type of the line should be a dotted line. because all what is before the bar chart is our actuals and after the bar chart is our forecast.
the bar char is our reporting week (in below case is 20W33).
Thanks for your support.
You could split the green line measure into two measure, then set line type separately.
for example:
Green measure 1=IF(MAX('Date'[Date])<=MAX('20W33'[Date]),[green line measure])
Green measure 2=IF(MAX('Date'[Date])>=MAX('20W33'[Date]),[green line measure])
Then use Green measure 1 and Green measure 2 in the line chart instead of green line measure. Now do formatting for these two new measure.
Regards,
Lin
for the green line i don't have a measure but a column which is calculating the cumulative of my data
Copying DAX from this post? Click here for a hack to quickly replace it with your own table names
Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C
I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com
Table name: STC_Deploy Progress
Column that calculate cumulative of the green line: cumulative. ACT+ FCT
for the red bar chart i've already shared the measure that i've used + column with formula that i've used.
br,
If possible, please share your simple sample pbix file for us, that will be a great help.
Regards,
Lin
Could you please share your sample pbix file for us have a test, that will be a great help.
Regards,
Lin
Copying DAX from this post? Click here for a hack to quickly replace it with your own table names
Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C
I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com
@Zakaria_1980 , you need the red bar the green dotted line. Not very clear to me
the red bar is shifted automatically from week to another based on the actual figures that i got. in the grapg i've shared with you, i got the actuals for W33 which means the red bar is plot automatically in the that week.
what i've asked is only on thu curve in green. in the graph i've sent i made the type of the line in dash. the team want that curve the type of the line should be solid before the red bar and then the type will change in dotted line after the red bar.
As a "quick and dirty" alternative to the solutions offered, you can use conditional formatting on a line chart (well, kind of...There isn't an option to apply conditional formatting in a line chart as a default option).
However...
Start with a bar chart, and apply the conditional formatting (in this example, I've simply coloured the data points after july 2019 in the reddish colour, using a simple measure to set a rule in the conditional formatting interface):
After 31 july 219 = IF(MAX('Calendar Table'[Date])> DATE(2019, 07, 31), 1)
Once you have set the conditional colour on the bar chart, select the visual and change it by clicking on the line chart visual in the visuals pane, to get you something like this (not ideal, I know, but "quick and dirty"...)
However, that is about it as to the formatting options you get using this method.
If you need flexiblility, I would follow @AllisonKennedy suggestion.
Proud to be a Super User!
Paul on Linkedin.
Copying DAX from this post? Click here for a hack to quickly replace it with your own table names
Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C
I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com
HI @Zakaria_1980 ,
I don't think this is possible to achieve as you want same metric to be shown as solid line before the bar and dotted line after the same bar.
Happy to know if someone in the community can tell a workaround for this.
Thanks,
Pragati
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.