Forum Discussion
Product Count Based on Shift
Hi,
I'm trying to count the number of products finished on each manager's time shift. Problem is each manager's shift changes every day.
I have two tables containing the following:
Table 1: Manager Schedule
Contains the shift schedule 2 shift managers per day
https://www.dropbox.com/scl/fi/4qb4rdo43teyew7yp0x07/Manager-Sample-Data.xlsx?dl=0&rlkey=gk8xt5cgyqskobp5h7hfcjl62
Table 2: Production Schedule
List of products and time when the product was made.
https://www.dropbox.com/s/7jh2hcycutk0zra/Schedule%20Sample%20Data.xlsx?dl=0
pbix file containing the two tables and date table:
https://www.dropbox.com/s/mh1146kycg2hq1k/Product%20Count%20Based%20On%20Shift.pbix?dl=0
The output should look like this:
Appreciate if you can help me out. Thanks!
Best regards,
Mark V
My bad, I misunderstood.
I kept the same changes mentioned above and added a new measure and created new visual. Please see if this helpsa) Created a measure part of manager schedule
Prod Count = var _d1 = Minx('Manager Schedule', 'Manager Schedule'[Start Time]) var _d2 = Minx('Manager Schedule', 'Manager Schedule'[Clock Out]) var _Prod_count = CALCULATE( COUNTROWS('Production Schedule'), FILTER('Production Schedule', 'Production Schedule'[Date Finished] >= _d1 && 'Production Schedule'[Date Finished] <= _d2)) return _Prod_count
12 Replies
- Ashish_MathurSuper User
Hi,
Since you want the output to be date wise, I am assuming that the time stamp appearing in each of the 2 tables is not required.
- markefrodyPost Patron
Ashish_Mathur
Hi Ashish,
Thank you for your reply.
For the output, time stamp is not required.
Best regards,
Mark V.- Ashish_MathurSuper User
Hi,
There should be another table which maps the products to managers.