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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

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

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

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
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

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.