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

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

Reply
Mous007
Helper IV
Helper IV

Percentage calculation by month

Hi all,

 

I am calculating office attendance and created the following table showing attendance for all period on my dates table and the calculation is correct as per below:

 

ss1.JPG

 

I want to keep the same result if no period is selected but i want the result to change if a select a specific period but im getting the following whenever i select a period from the slicer:

ss2.JPG

 

I am basically trying to get a 100% as a total for that month and my daily percenatge to be calculated accordingly and the result should be like:

 

Total = 100%

Monday = (32/142) = 22%

Tuesday = ( 26/142) = 18% 

 

My weekday % split calc is = 

weekday % split for office w = DIVIDE(CALCULATE(COUNTA('data sample'[Day Name]), 'data sample'[Location] = "Office"), CALCULATE([Office attendance] , ALL('Dates table')))
 
Any guidance or help would be appreciated.
 
Thank you.
 
1 ACCEPTED SOLUTION
Greg_Deckler
Community Champion
Community Champion

@Mous007 - Try:

My weekday % split calc is = 

weekday % split for office w = DIVIDE(CALCULATE(COUNTA('data sample'[Day Name]), 'data sample'[Location] = "Office"), CALCULATE([Office attendance] , ALLSELECTED('Dates table')))

Otherwise, going to need sample data to test with.

 

Please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490

The most important parts are:
1. Sample data as text, use the table tool in the editing bar
2. Expected output from sample data
3. Explanation in words of how to get from 1. to 2. 



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

View solution in original post

2 REPLIES 2
Greg_Deckler
Community Champion
Community Champion

@Mous007 - Try:

My weekday % split calc is = 

weekday % split for office w = DIVIDE(CALCULATE(COUNTA('data sample'[Day Name]), 'data sample'[Location] = "Office"), CALCULATE([Office attendance] , ALLSELECTED('Dates table')))

Otherwise, going to need sample data to test with.

 

Please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490

The most important parts are:
1. Sample data as text, use the table tool in the editing bar
2. Expected output from sample data
3. Explanation in words of how to get from 1. to 2. 



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Hi @Greg_Deckler , thank you for the quick reposnse.

 

allselected instead of all solved it.

 

thanks again

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 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.