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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
BassG
Frequent Visitor

Line Chart Sum of Legend as a separate line.

Hi all,

Total noob to PBI.  I've tried doing a search both here & google for what I'm trying to do, but not having much luck.

My data that I'm using has columns "Incident ref", "Year", "Term" & "Gender".

I've got a line chart (to make a timeline), that has the X axis as Year & Term & the Y axis as Incident, so this shows me the total number of incidents over time & I have a slicer for Gender.
What I'm wanting to do though is have Gender on the timeline, so the chart will show Male & Female incidents as 2 lines (this much I can do by placing the "Gender" field in "Legend", but what I'm struggling to do is have a 3rd line on the chart that shows the total.

Is there a way to have 3 lines on the chart, one for Male, one for Female & one for Total?
Just whilst typing, I'm wondering if adding a helper column to the data would get around it?

 

Thanks in advance,
G

1 ACCEPTED SOLUTION
Ritaf1983
Super User
Super User

Hi @BassG 
You can achieve it, using the "field parametrs".
Please refer my answer here:
https://community.powerbi.com/t5/Desktop/Slicer-for-line-chart-how-to-show-3-options-and-or-a-sum-of...

A file I prepared is also available for download in my answer on those discussion.
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

3 REPLIES 3
Ritaf1983
Super User
Super User

Hi @BassG 
You can achieve it, using the "field parametrs".
Please refer my answer here:
https://community.powerbi.com/t5/Desktop/Slicer-for-line-chart-how-to-show-3-options-and-or-a-sum-of...

A file I prepared is also available for download in my answer on those discussion.
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Thanks Ritaf1983, that worked perfectly.

Just been rather busy to get back & say thanks.  🤗

G

Glad to help 🙂

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.