Forum Discussion

Razaning's avatar
Razaning
Frequent Visitor
3 years ago
Solved

Summing columns with condition

Hey y'all!

 

I'm trying to sum columns with a conidion, where the value <> 4 

I tried to do the following but I didn't succeed: 

((Column A <> 4) + (Column B <> 4) + (Column C <> 4))/10

 

Any idea how this can be done?

 

Thank you

  • Hi Razaning 

    please try

    Measur =
    SUMX (
    FILTER (
    'Table',
    'Table'[ColumnA] <> 4
    && 'Table'[ColumnB] <> 4
    && 'Table'[ColumnC] <> 4
    ),
    'Table'[Column A] + 'Table'[Column B] + 'Table'[Column C]
    ) / 10

1 Reply

  • tamerj1's avatar
    tamerj1
    Community Champion

    Hi Razaning 

    please try

    Measur =
    SUMX (
    FILTER (
    'Table',
    'Table'[ColumnA] <> 4
    && 'Table'[ColumnB] <> 4
    && 'Table'[ColumnC] <> 4
    ),
    'Table'[Column A] + 'Table'[Column B] + 'Table'[Column C]
    ) / 10