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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
apatnola
Helper I
Helper I

Count rows by Year

I want to figure out how to show each person's % of the total year in the stacked column chart below. Each color below represents the count for each employee. I want to show as a tool tip each color's % for that year.

 

So for light blue, the calculation would be 2550/13,769.

chart.PNG

1 ACCEPTED SOLUTION
JIGAR
Resolver IV
Resolver IV

@apatnola 

 

You can create 3 measures

 

1. TotalCount = CALCULATE(COUNT(Table[Column]))

 

Use this 1st measure as value

 

2. TotalCountForAllEmployees = CALCULATE(COUNT(Table[Column]),ALL(Table[Employees]))

 

3. %CountPerEmployee = DIVIDE(TotalCount,TotalCountForAllEmployees)

 

Use this 3rd measure as tooltip.

 

I assume you are using Employees as Legend values.

 

Attached is a example of how this is going to look. I am using Region instead of Employees. Capture.PNG

 

Hope this helps !!

 

Thanks

 

 

View solution in original post

5 REPLIES 5
Ashish_Mathur
Super User
Super User

Hi,

Share the link from where i can download your PBI file.


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

Hi,

You can download the PBI file from this location

https://drive.google.com/open?id=16TOpguo6yv-Z0IByBadWmiJAauGgxM1h

Hi,

I believe your question has been answered.  Therefore i am not downloading your file.


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

@apatnola 

 

You can create 3 measures

 

1. TotalCount = CALCULATE(COUNT(Table[Column]))

 

Use this 1st measure as value

 

2. TotalCountForAllEmployees = CALCULATE(COUNT(Table[Column]),ALL(Table[Employees]))

 

3. %CountPerEmployee = DIVIDE(TotalCount,TotalCountForAllEmployees)

 

Use this 3rd measure as tooltip.

 

I assume you are using Employees as Legend values.

 

Attached is a example of how this is going to look. I am using Region instead of Employees. Capture.PNG

 

Hope this helps !!

 

Thanks

 

 

Thank you for the clear response. Worked like a charm!

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

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.