Forum Discussion

Murkow's avatar
Murkow
Frequent Visitor
8 years ago
Solved

Calculating based on filtering column values

Hi everybody,

I'd like to ask you to help me with a DAX formula.

I have this situation

 

I need to get the formula for the yellow Requested column.

The logic is following:

I need to calculate all hours of every user that are not _Attendance

 

Thank you in advance.

 

 

  • Murkow

     

    Try this Column

     

    Requested =
    CALCULATE (
        SUM ( TableName[Hours] ),
        FILTER (
            ALLEXCEPT ( TableName, TableName[User] ),
            TableName[Project category] <> "_Attendance"
        )
    )

2 Replies

  • Zubair_Muhammad's avatar
    Zubair_Muhammad
    Community Champion

    Murkow

     

    Try this Column

     

    Requested =
    CALCULATE (
        SUM ( TableName[Hours] ),
        FILTER (
            ALLEXCEPT ( TableName, TableName[User] ),
            TableName[Project category] <> "_Attendance"
        )
    )
    • Murkow's avatar
      Murkow
      Frequent Visitor

      Worked perfectly, than you, Muhammad