Forum Discussion
Product Count Based on Shift
- 4 years ago
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
Ashish_Mathur
Hi Ashish,
I have created a pbix with date table to connect the tables together.
https://www.dropbox.com/s/mh1146kycg2hq1k/Product%20Count%20Based%20On%20Shift.pbix?dl=0
Please let me know if this helps. Thanks.
Best regards,
Mark V.
1. Create column as Date part only
Date Finished DT = DATEVALUE('Production Schedule'[Date Finished])
mark the format as "mm/dd/yyyy" to the new column
similar format to Manager schedule - start date column.
2. Adjust the model and see if it works for your needs
See if this helps
- markefrody4 years agoPost Patron
sevenhills
Hi,
Thank you for your proposed solution but I need the count of products finished that is within the manager's respective schedule.
I have tried your proposed solution. It does not differentiate how many products where finished by each manager during the day. It shows the same count of products for Manager A and B for that day.- sevenhills4 years agoSuper User
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- markefrody4 years agoPost Patron
sevenhills
Hi,
Thank you for the revision. It seems the total per day for 9/27/2021 is not the same as the calculated measure.
Product Count
Calculated Measure