Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago
Solved

remove specific row in calculation

hello everyone i have a table   Name     Shift              Hour A Worktime 8 A Worktime 9 A Worktime 10 A Worktime 11 A Break 11 A Break 12 A Worktime 12 ...
  • Anonymous's avatar
    Anonymous
    3 years ago

     I just created a new calculated column that find the max value filtered by name

    Maxnonworking = CALCULATE(MAX(table[Hour]),FILTER(ALLEXCEPT(table,Roster[Name]),table[shift]<>"Worktime"))

    then for the nonavailable shift just create a new measure:

    not availibile = CALCULATE(COUNT(table[Name]),FILTER(table,table[Shift] <> "Worktime"),FILTER(table,table[Hour]<>table[Maxnonworking]))