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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
craigsmajors
Regular Visitor

Sum by grouping and filter on that.

Hello, I am working on a production report. I have a csv file that is connected to Power BI. The report is already set up the way that I want it for the most part.

 

The problem is that I want to be able to filter out employees (user column) that do not have 30 hours in the particular activity selected for the date range selected.

 

The report I have created shows the Activity, User, and a Per Hour based on measureQty and hours for the selected date range (it will usually be monthly)

 

When I go to filter by hours it will only show the individual hours (see sample data below) and not the sum of the hours on the already filtered date range. 

 

I think I need to create a new measure that sums the hours but I cannot figure out how to get it to filter along with the report. I either get all of the data sumed, or I get them individual neither of which will work correctly.

 

I tried this DAX code but I am not sure I am doing it correctly

 

Measure = GROUPBY(
    INDprodEq,
    INDprodEq[workDateText],
    INDprodEq[Activity],
    INDprodEq[Employee],
    "TotalHours", sumx(CURRENTGROUP(), sum(INDprodEq[hours])
    ))

 

Any help would be greatly appriciated. Let me know if you need any additional information.

 

Thank you.

 

 

Here is a sample of the data that I am using.

workDateUserdeptNameDeptCodeActivityWorked WG3 CodemeasureQtyhoursEmployeeType
11/20/17User1Receiving20East - Ctn Putaway - REC12742.5Full Time
11/20/17User2Equipment14East - BCA Pick16113Full Time
11/21/17User2Equipment14East - BCA Pick161652.75Full Time
11/21/17User4Equipment14East - BCA Pick1611536Full Time
11/22/17User2Equipment14East - BCA Pick16122Full Time
11/22/17User4Equipment14East - BCA Pick1611214.25Full Time
11/27/17User1Equipment14East - BCA Pick161160.5Full Time
11/27/17User2Equipment14East - BCA Pick161191Full Time
11/27/17User3Equipment14East - BCA Pick1611765Full Time
11/27/17User4Receiving20East - Ctn Putaway - REC12764Full Time
11/28/17User1Equipment14East - BCA Pick161220.75Full Time
11/28/17User3Equipment14East - BCA Pick1611987Full Time
11/29/17User1Equipment14East - BCA Pick161681.5Full Time
11/29/17User2Equipment14East - BCA Pick1611394.5Full Time
11/29/17User2Receiving20East - Ctn Putaway - REC12711Full Time
11/29/17User3Equipment14East - BCA Pick1611926.25Full Time
11/29/17User4Receiving20East - Ctn Putaway - REC12760.25Full Time
11/30/17User1Equipment14East - BCA Pick161431.25Full Time
11/30/17User1Receiving20East - Ctn Putaway - REC127160.75Full Time
11/30/17User2Equipment14East - BCA Pick1611104.25Full Time
11/30/17User3Equipment14East - BCA Pick1611676.25Full Time
12/1/17User1Equipment14East - BCA Pick1611303Full Time
12/1/17User2Equipment14East - BCA Pick161692Full Time
12/1/17User3Equipment14East - BCA Pick1611033.25Full Time
12/1/17User4Receiving20East - Ctn Putaway - REC12721.5Full Time
1 REPLY 1
Greg_Deckler
Community Champion
Community Champion

You could create a New Table using SUMMARIZE and then you would be able to filter on your SUM'd hours perhaps? I may not understand what you are driving at, I don't see an example of your results or what you are trying to achieve.



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...

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors