Forum Discussion

Saaharjit's avatar
Saaharjit
Helper I
9 years ago
Solved

HOW TO CALCULATE THROUGH PUT

I have have a table containing units produced by an employee on a particular date. 1. i want to be able to provide a date fliter to the user. For eg if the user wants to see the production from 18 a...
  • dkay84_PowerBI's avatar
    9 years ago

    First, you should create a date table that links to your fact table.

     

    Then, create a few measures:

     

    Production = Sum(Table[Units])

    DayCount = Datediff(Min(Calendar[Date]), Max(Calendar[Date], day))

     

    Finally:

     

    Throughput = Production/DayCount

     

    Now, when you put in date range slicer using the date table field, a selected date range will filter the production table, so you only get the units produced for that range.  The DayCount measure counts the days in the calendar table based on the min/max (which will be adjusted based on your filter selection).

     

    If you want to view by employee, create a table or other visual with employee name as an axis/row, and add the measure to the values field for the visual (or add a slicer for employee from the production table).