FILTER function inside CALCULATE


#1

Hi all,

See below example, I am using FILTER to extract certain Account Types inside the Table.

Is it possible to do the opposite, and return all the transactions except ‘Sales Data’[Account Type] = “REVENUE”

I.e. that returns all the rows except Account Type of REVENUE.

Customer Sales = CALCULATE( SUM(‘Sales Data’[Net Amount]),

                                 FILTER( ALL( 'Sales Data'[Account Type] ),
                                  'Sales Data'[Account Type] = "REVENUE"
                                     )   )          

Cheers

Cam


#2

Ohhhhh I solved this. The answer is <>

So in the example;

Customer Sales = CALCULATE( SUM(‘Sales Data’[Net Amount]),

                             FILTER( ALL( 'Sales Data'[Account Type] ),
                              'Sales Data'[Account Type] <> "REVENUE"
                                 )   )

#3

Yes easy as that.