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
nbarta
Frequent Visitor

Filtering by Department as a whole

PersonIDDepartmentOvertimeRegularOT % (OT / (OT +REG)) 
1Produce51033%
2Produce1204.7%
3Dairy31023%
4Dairy52020%
5Produce101050%
6Liquor202050%

 

Here is an example of the dataset I'm working with. I have a chart that shows Department by Overtime Percentage. I want to show departments that have a total over time percentage of above 25%. When I put a filter to look for OT% > 25% then it removes each individual that does not meet the requirement instead of filtering based on the department, which is what I want to do. So for Produce Department, their total OT Percent is calculated as 29% [ (33 + 4.7 + 50)/3 ]  But with the filter I would lose the 4.7% row. 

 

I've looked through a few posts that were similar but nothing I've tried so far is working correctly 

 

1 ACCEPTED SOLUTION
Jos_Woolley
Solution Sage
Solution Sage

Hi,

Try adding a new measure:

OT % (Department) =
CALCULATE (
    DIVIDE (
        SUM ( MyTable[Overtime] ),
        SUM ( MyTable[Overtime] ) + SUM ( MyTable[Regular] )
    ),
    ALLEXCEPT ( MyTable, MyTable[Department] )
)

and using that in the Filters pane instead.

Regards

View solution in original post

1 REPLY 1
Jos_Woolley
Solution Sage
Solution Sage

Hi,

Try adding a new measure:

OT % (Department) =
CALCULATE (
    DIVIDE (
        SUM ( MyTable[Overtime] ),
        SUM ( MyTable[Overtime] ) + SUM ( MyTable[Regular] )
    ),
    ALLEXCEPT ( MyTable, MyTable[Department] )
)

and using that in the Filters pane instead.

Regards

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.