The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
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.
workDate | User | deptName | DeptCode | Activity | Worked WG3 Code | measureQty | hours | EmployeeType |
11/20/17 | User1 | Receiving | 20 | East - Ctn Putaway - REC | 127 | 4 | 2.5 | Full Time |
11/20/17 | User2 | Equipment | 14 | East - BCA Pick | 161 | 1 | 3 | Full Time |
11/21/17 | User2 | Equipment | 14 | East - BCA Pick | 161 | 65 | 2.75 | Full Time |
11/21/17 | User4 | Equipment | 14 | East - BCA Pick | 161 | 153 | 6 | Full Time |
11/22/17 | User2 | Equipment | 14 | East - BCA Pick | 161 | 2 | 2 | Full Time |
11/22/17 | User4 | Equipment | 14 | East - BCA Pick | 161 | 121 | 4.25 | Full Time |
11/27/17 | User1 | Equipment | 14 | East - BCA Pick | 161 | 16 | 0.5 | Full Time |
11/27/17 | User2 | Equipment | 14 | East - BCA Pick | 161 | 19 | 1 | Full Time |
11/27/17 | User3 | Equipment | 14 | East - BCA Pick | 161 | 176 | 5 | Full Time |
11/27/17 | User4 | Receiving | 20 | East - Ctn Putaway - REC | 127 | 6 | 4 | Full Time |
11/28/17 | User1 | Equipment | 14 | East - BCA Pick | 161 | 22 | 0.75 | Full Time |
11/28/17 | User3 | Equipment | 14 | East - BCA Pick | 161 | 198 | 7 | Full Time |
11/29/17 | User1 | Equipment | 14 | East - BCA Pick | 161 | 68 | 1.5 | Full Time |
11/29/17 | User2 | Equipment | 14 | East - BCA Pick | 161 | 139 | 4.5 | Full Time |
11/29/17 | User2 | Receiving | 20 | East - Ctn Putaway - REC | 127 | 1 | 1 | Full Time |
11/29/17 | User3 | Equipment | 14 | East - BCA Pick | 161 | 192 | 6.25 | Full Time |
11/29/17 | User4 | Receiving | 20 | East - Ctn Putaway - REC | 127 | 6 | 0.25 | Full Time |
11/30/17 | User1 | Equipment | 14 | East - BCA Pick | 161 | 43 | 1.25 | Full Time |
11/30/17 | User1 | Receiving | 20 | East - Ctn Putaway - REC | 127 | 16 | 0.75 | Full Time |
11/30/17 | User2 | Equipment | 14 | East - BCA Pick | 161 | 110 | 4.25 | Full Time |
11/30/17 | User3 | Equipment | 14 | East - BCA Pick | 161 | 167 | 6.25 | Full Time |
12/1/17 | User1 | Equipment | 14 | East - BCA Pick | 161 | 130 | 3 | Full Time |
12/1/17 | User2 | Equipment | 14 | East - BCA Pick | 161 | 69 | 2 | Full Time |
12/1/17 | User3 | Equipment | 14 | East - BCA Pick | 161 | 103 | 3.25 | Full Time |
12/1/17 | User4 | Receiving | 20 | East - Ctn Putaway - REC | 127 | 2 | 1.5 | Full Time |
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.