Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Help with Dynamic DAX Measure

Imagine a data set where there are multiple work dates, multiple employees on each work date, and multiple tasks performed by each employee on each work date.   How can I create a DYNAMIC measure t...
  • Anonymous's avatar
    Anonymous
    6 years ago

    Hi, I am so sorry I must have missed your last reply/solution.

    At the end, this is what I used:

     

    Total Work Mins = [Total Number of Employees]*480 (=8x60=No. of work mins in a day)*[Number of Weekdays Selected]

     

    where

    Number of Weekdays Selected = var MinDate = MIN(Date_Calendar[Date])
    var MaxDate = MAX(Date_Calendar[Date])
    return CALCULATE(DISTINCTCOUNT(Date_Calendar[Date]),'Date_Calendar'[Date]<MaxDate,'Date_Calendar'[Date]>=MinDate,Date_Calendar[IsWeekday]=1)