Beast Mode calc for omitting specific modalities?

I have a dataset that contains data on a whole collection of transactions. Within the dataset is a dimension I'm interested in- Divisional Expenses. This dimension has a few modalities- HR, Sales, Marketing, etc. Each of these modalities has a value.


If I want to create a beast mode calculation on Divisional Expenses that excludes a particular modality (such as Marketing), how would I write the statement? I tried writing it like this but obviously it didn't work...


SUM('Divisional Expenses'= NOT 'Marketing')


TIA

Answers

  • If you wanted to go the beast mode route, you're on the right track. You need to create a CASE WHEN statement within the SUM function:

    SUM(case when 'Divisional Expenses' <> "Marketing" then 'Amount' else 0 end)

    'Amount' would be whatever your value column is. Another option is to just do a regular sum of you Divisional Expenses column and just add a Divisional Expenses as a filter to your card and you can exclude whatever modalities you want. Then they won't be added and you can easily change the filter depending on what you want to exclude instead of having to go and edit the beast mode each time.

    **Was this post helpful? Click Agree or Like below**

    **Did this solve your problem? Accept it as a solution!**