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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Peter_2020
Helper III
Helper III

SUM with specific filter 2

Hi all, 

I would like to ask you for help with following situation: I have this table with lot of different PO´s. The issue I will explain you on one PO like an example:

Peter_2020_0-1683715387365.png

As you can see each PO have specific Operation and Code - 01 - assigned to hours and 20 - assigned to quantity. And what I need to achieve is to get for each PO, OPERATION and RC SUM of the hours and quantity in each row. It must look like this:

Peter_2020_1-1683715676787.pngPeter_2020_4-1683716082937.png

 

Peter_2020_2-1683715749070.pngPeter_2020_5-1683716120761.png

 

Peter_2020_3-1683715834956.pngPeter_2020_6-1683716157870.png

Peter_2020_7-1683716191534.pngPeter_2020_8-1683716307143.png

 

Any idea how to achieve this?

Thank you in advance. 

P.

1 ACCEPTED SOLUTION
johnt75
Super User
Super User

OK, try

Sum hours =
CALCULATE (
    SUM ( 'Table'[Hours] ),
    ALLEXCEPT ( 'Table', 'Table'[PO], 'Table'[Operation] )
)

View solution in original post

4 REPLIES 4
johnt75
Super User
Super User

OK, try

Sum hours =
CALCULATE (
    SUM ( 'Table'[Hours] ),
    ALLEXCEPT ( 'Table', 'Table'[PO], 'Table'[Operation] )
)

@johnt75 Bingo! Now it works. Thank you so much for your help

johnt75
Super User
Super User

Try

Sum hours =
VAR SummaryTable =
    SUMMARIZE ( 'Table', 'Table'[PO], 'Table'[Operation], 'Table'[RC] )
VAR Result =
    CALCULATE ( SUM ( 'Table'[Hours] ), SummaryTable )
RETURN
    Result

Hi @johnt75 , 

thank you for your reply. It calculate the sum of the hours but it is split by the RC number what is wrong:

Peter_2020_0-1683726779794.png

Peter_2020_1-1683726834846.png

Peter_2020_2-1683726887196.pngPeter_2020_3-1683726922804.png

What I need is to get the sum of all hours for specific PO  and Operation to both lines with RC number. 

P. 

 

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.

Top Solution Authors