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
mariella2
Helper I
Helper I

Line chart showing the total line after adding the field for the legend

Hi, I am building a report in Power Bi desktop. I have a line chart with the Calendar[Date] on the X axis and a measure to calculate open risks on the Y axis. This is the measure:

 

Open Risks = CALCULATE(COUNTx(FILTER('Risk','Risk'[Creation Date]<= max('Calendar'[Date]) && (ISBLANK('Risk'[Mitigated Date]) || 'Risk'[Mitigated Date]max('Calendar'[Date]))),[Risk ID]),CROSSFILTER('Calendar'[Date],'Risk'[Creation Date],None))
 
Then I add the Rating field in the legend so that the Total Open risks is split in four lines respectively Low, Medium, High, Critical.
 
My problem is that I'd like also to visualise a line for the total Open risks in the same line chart to show the trend over time.
Something like this:
 
mariella2_0-1689109564279.png

I tried duplicating the same visualisation putting them on top of each other disabling some settings such as title, legend, etc, but it is not something easy to mantain. 
Do you have any idea how to solve this? Do you know a custom visual that would do what I want?
Thanks a lot in advance.

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@mariella2 , You can do that in line and Clustered column chart visual not in line visual. As in line visual secondary axis/line is not supported with legend

 

In line and Clustered column visual line is supported with legends on primary axis

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

View solution in original post

2 REPLIES 2
amitchandak
Super User
Super User

@mariella2 , You can do that in line and Clustered column chart visual not in line visual. As in line visual secondary axis/line is not supported with legend

 

In line and Clustered column visual line is supported with legends on primary axis

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

Thanks for your answer. I went to add the clustered column chart with the line, but I don't see the 'Line value field' as shown  on different website.

mariella2_0-1689147950537.png

 

Edit: found it.

P.S. Anyway do you know any custom visual that would work like in the image I have posted above (Line chart)?

 

 

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