Forum Discussion

Dom87326's avatar
Dom87326
Helper II
4 years ago
Solved

CALCULATE modifiers

Hello, 

 

I'm wondering can we use ALLEXCEPT and FILTER together as a CALCULATE modifier?

 

In the below measure I'm taking the average of Answer Result for year 2022 without ignoring client industry and client category filters. 

Data model: 

dim date 1:many answer result
dim client 1:many answer result 

 

Measure:

BenchmarkAnswerNumeric =
CALCULATE (
AVERAGE ( Total[AnswerResult] ),
ALLEXCEPT (
DIM_CLIENT,
DIM_CLIENT[ClientIndustry],
DIM_CLIENT[ClientCategory]
),
FILTER('Date', 'Date'[Year] = 2022)
)
 
Thanks! 
  • Dom87326 

    ALLEXCEPT is indeed a CALCULATE modifier. However, FILTER is a table. And yes of course you can use both together. 
    In you measure ALLEXCEPT basically removes all the filters from all DIM_CLIENT table columns except the two columns indicated inside ALLEXCEPT. 
    FILTER is replacing the filter from the date table - year column with the value 2022

1 Reply

  • tamerj1's avatar
    tamerj1
    Community Champion

    Dom87326 

    ALLEXCEPT is indeed a CALCULATE modifier. However, FILTER is a table. And yes of course you can use both together. 
    In you measure ALLEXCEPT basically removes all the filters from all DIM_CLIENT table columns except the two columns indicated inside ALLEXCEPT. 
    FILTER is replacing the filter from the date table - year column with the value 2022