Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

Month-End Work in Progress (WIP)

I'm working on a set of monthly metrics that include work in progress (WIP) at the end of each month. The results will be shown on a dashboard with a slicer for the months. My datasource does not cap...
  • PaulOlding's avatar
    PaulOlding
    5 years ago

    For this solution I have a disconnected Date table that will be used for the Month column of the table.

     

    The measures all follow the same pattern.

    Status <> Completed =
    VAR _CurrentDate = MAX('Date'[Date])
    VAR _Result =
    CALCULATE(
    COUNTROWS('DataTable'),
    'DataTable'[Status] <> "Completed",
    'DataTable'[Received Date] <= _CurrentDate
    )
    RETURN
    _Result
     
    Completed after month end =
    VAR _CurrentDate = MAX('Date'[Date])
    VAR _Result =
    CALCULATE(
    COUNTROWS('DataTable'),
    'DataTable'[Completed Date] > _CurrentDate,
    'DataTable'[Received Date] <= _CurrentDate
    )
    RETURN
    _Result
     
    Total WIP at end of month =
    VAR _CurrentDate = MAX('Date'[Date])
    VAR _Result =
    CALCULATE(
    COUNTROWS('DataTable'),
    'DataTable'[Status] <> "Completed" || 'DataTable'[Completed Date] > _CurrentDate,
    'DataTable'[Received Date] <= _CurrentDate
    )
    RETURN
    _Result
     
    Of course, for the last measure you could just add the results of the previous 2 measures.
     
    You'll probably want to use month and year in your table visual otherwise the results won't make sense if you have multiple years of data.