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

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

Reply
Anonymous
Not applicable

Filter Multiple Columns from single table

I have a table RT Hr DB an it has multiple columns. Want to filter column Department=UW and Hour Type=Overtime and sum the Days. This is what I have so far

 

SUMX(FILTER(FILTER('RT Hr DB','RT Hr DB'[Hour Type]="Vacation"), RT Hr DB'[Department]="Underwriting"), 'RT Hr DB[Days])
6 REPLIES 6
jdbuchanan71
Super User
Super User

Hello @Anonymous 

Give this a try.

UW OT = 
CALCULATE(
    SUM ( 'RT Hr DB'[Days] ),
    'RT Hr DB'[Department] = "Underwriting",
    'RT Hr DB'[Hour Type] = "Overtime")
Anonymous
Not applicable

@jdbuchanan71 

 

I tried this but it still does not give me the right answer.

Hello @Anonymous 

Please provide some sample data and and example of the expected outcome.

Anonymous
Not applicable

Formula 1 = (SUMX(filter('RT Prod HC',[Team]="UW"),[Workdays])-(CALCULATE(SUM('RT Hr DB'[Days]),'RT Hr DB'[Hour Type] = "Vacation",'RT Hr DB'[Department] = "Underwriting"))-CALCULATE(SUM('RT Hr DB'[Days]),'RT Hr DB'[Hour Type] = "Partial Hours Off",'RT Hr DB'[Department] = "Underwriting")+(CALCULATE(SUM('RT Hr DB'[Days]),'RT Hr DB'[Hour Type] = "Overtime",'RT Hr DB'[Department] = "Underwriting"))/(SUMX(FILTER('RT Prod HC',[Team]="UW"),'RT Prod HC'[Prod HC])))
 
Formula 2 = 
(SUMX(filter('RT Prod HC',[Team]="UW"),[Workdays])-((SUM('UW Vacation'[Days]))/(SUMX(FILTER('RT Prod HC',[Team]="UW"),'RT Prod HC'[Prod HC])))+((SUM('UW Overtime1'[Days]))/(SUMX(FILTER('RT Prod HC',[Team]="UW"),'RT Prod HC'[Prod HC]))))
 
Formula 1 is when I tried to filter the same table multiple times. Formula 2 is when I duplicate the table in power query and then put in the filters. Both have the same data but they are giving me 2 different answers.
image.png

@Anonymous 

In your picture, what number is wrong and what should it be?  Also, we will need sample data from the tables involved and to know how the model relationships are set up.  If you can share your .pbix file that will help us answer your question.

Anonymous
Not applicable

@jdbuchanan71 image.png

This table is where the raw data is taken from. I duplicated this table to filter out without a formula. The line graph with value 8.95 should be the right one which i got by duplicating the table and filtering it separately rather than doing multiple filters with the formula.

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

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