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

Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers. Get Fabric certified for FREE! Learn more

Reply
coetseem
Frequent Visitor

DAX Formula

Hi All,

 

I have a table with data for teams, the owner / month i am trying to create a formula that determine the % per user per team. I am trying to determine a DAX formula that calculates the Final % now the formula that i have work if no month or year is selected but once you select the month and year then the formula does not work.

 

Sample data

The Final % is what i am trying to get to:

TeamOwnerMonthCountFinal % 
Team1User1Feb-2526742% 
Team1User2Feb-2513622% 
Team1User3Feb-25559% 
Team1User4Feb-25437% 
Team1User5Feb-259415% 
Team1User6Feb-25345%629
Team1User1Jan-251009% 
Team1User2Jan-2550045% 
Team1User3Jan-2520% 
Team1User4Jan-2540036% 
Team1User5Jan-251009% 
Team1User6Jan-2520%1104
Team2User1Feb-2527740% 
Team2User2Feb-2514621% 
Team2User3Feb-25659% 
Team2User4Feb-25538% 
Team2User5Feb-2510415% 
Team2User6Feb-25446%689
Team2User1Jan-251109% 
Team2User2Jan-2551044% 
Team2User3Jan-25121% 
Team2User4Jan-2541035% 
Team2User5Jan-251109% 
Team2User6Jan-25121%1164

 

Current Results:

 

DAX Formula: 

 

Distinct Count by Team =
CALCULATE(
    DISTINCTCOUNT('Step 1 - Approval'[ID]),     
    ALLEXCEPT('Step 1 - Approval', 'Step 1 - Approval'[Team])     
)

--------------------------------------------------------------------------

% Distinct Count Contribution =
DIVIDE(
    DISTINCTCOUNT('Step 1 - Approval'[ID]),       
    [Distinct Count by Team],                      
    0  
                                          
)

 

TeamOwnerCount%
Team1User12442,56%
Team2User21491,56%
Team3User31431,50%
Team4User4250,26%
Team5User5620,65%
Team6User6270,28%
Team1User120,96%
Team2User220,96%
Team3User3146,73%
Team5User462,88%
Team1User1104,81%
Team2User211,00%
Team3User311,00%
Team4User411,00%
Team5User511,00%
1 ACCEPTED SOLUTION
bhanu_gautam
Super User
Super User

@coetseem First, calculate the total count per team for the selected month and year:

DAX
Total Count by Team =
CALCULATE(
SUM('Step 1 - Approval'[Count]),
ALLEXCEPT('Step 1 - Approval', 'Step 1 - Approval'[Team], 'Step 1 - Approval'[Month])
)

 

Then, calculate the percentage contribution of each user per team:

DAX
% Contribution by User =
DIVIDE(
SUM('Step 1 - Approval'[Count]),
[Total Count by Team],
0
)




Did I answer your question? Mark my post as a solution! And Kudos are appreciated

Proud to be a Super User!




LinkedIn






View solution in original post

2 REPLIES 2
bhanu_gautam
Super User
Super User

@coetseem First, calculate the total count per team for the selected month and year:

DAX
Total Count by Team =
CALCULATE(
SUM('Step 1 - Approval'[Count]),
ALLEXCEPT('Step 1 - Approval', 'Step 1 - Approval'[Team], 'Step 1 - Approval'[Month])
)

 

Then, calculate the percentage contribution of each user per team:

DAX
% Contribution by User =
DIVIDE(
SUM('Step 1 - Approval'[Count]),
[Total Count by Team],
0
)




Did I answer your question? Mark my post as a solution! And Kudos are appreciated

Proud to be a Super User!




LinkedIn






Thank you, it worked.

Helpful resources

Announcements
March PBI video - carousel

Power BI Monthly Update - March 2025

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

March2025 Carousel

Fabric Community Update - March 2025

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

Top Solution Authors