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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Eternally333
Regular Visitor

How to show percentage calculation of aggregate AND segments on line chart (text fields)

Hi, I'm a beginner to PowerBI and do not know DAX or any coding at the outset.

 

On my sample spreadsheet I'm dealing with the YEAR, RESULT, GENDER fields.

There's a 'picture' of the result I want to get to. How can I:

1) Show a line for 'All' (the Total) AND for each Gender. I can only seem to get just Male and Female alone

2) Just show the 'Pass' Result - but what I want to show is not the counts for 'Pass' but the % passed out of the total cohort for each year. Passed % out of all each year and for each Gender, the % Passed from each Gender total each year. And show everything Year by Year in a time series as below line chart.

 

[So 1950 there were 8 students: Pass rate all 50%, 4 Males with Pass Rate 100% 4 Females with Pass Rate 0%]

 

Do I need to do calculations in Excel first or can I/should I do it all in PowerBi and how?!

 

PowerBi data.JPG

PowerBi result.jpg




1 ACCEPTED SOLUTION

Yes Ashish, marvellous! I followed all your Measures calculation steps and it works exactly. It's exactly right, many kind thanks 👍

View solution in original post

6 REPLIES 6
Eternally333
Regular Visitor

 

This is as far as I managed to get so far with Filter for 'Pass' on 'Result'. I need the 3rd line showing the Total of Male + Female. And I need % Pass Rates for all three instead of Counts.

 

PowerBi result2.JPG

Eternally333
Regular Visitor

Thanks for reply, appreciate it. I can't use my work account to send the file and don't have another account right now. Will the data table below be ok please to help? Appreciate it, thanks

YearResultDisciplineGender
1950PassArtsM
1950PassArtsM
1950PassArtsM
1950PassArtsM
1950FailArtsF
1950RetakeSciencesF
1950Retake

Sciences

F
1950RetakeArtsF
1951Fail

Sciences

M
1951RetakeSciencesM
1951PassArtsF
1951PassArtsF
1952

Pass

ArtsF
1952PassArtsM
1952PassArtsF
1952FailSciencesM
1953PassArtsF
1953RetakeSciencesF
1953FailArtsM
1954PassArtsM
1954PassSciencesM
1954PassSciencesF
1954FailSciencesF
1954RetakeArtsM

Hi,

You may download my PBI file from here.

Hope this helps.

Untitled.png


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Yes Ashish, marvellous! I followed all your Measures calculation steps and it works exactly. It's exactly right, many kind thanks 👍

You are welcome.  If my reply helped, please mark it as Answer.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
Ashish_Mathur
Super User
Super User

Hi,

Share the download link of your PBI file.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.