14 Replies Latest reply on Jul 6, 2018 7:48 AM by Jim Dehner

Calculation Field Filter

Hi together,

is it possible to include filters, if I want to calculate a new KPI by creating a new calculation field.

For example, if I want to filter the measure (Revenue) so that returns are not included. Is it possible?

(Revenue) - (Costs)

Thank you

• 1. Re: Calculation Field Filter

Probably its easier to get it visually. I need to filter the measure "Umsatz" by the dimension "typ1" / selection "Bestellung" and the measure "Gebühren Gesamt" by the dimension "typ1" and all selections.

• 2. Re: Calculation Field Filter

Good morning

Can you use a calculation as a filter - yes you can

in the case you sited you can exclude returns from the revenue by using a filter like

[Revenue]<>'Returns'

it is a t/f filter - place the calculation on the filter shelf and set to True

Jim

If this posts assists in resolving the question, please mark it helpful or as the 'correct answer' if it resolves the question. This will help other users find the same answer/resolution.  Thank you.

• 3. Re: Calculation Field Filter

Hi,

thank you for your answer. Unfortunately the calculation shows the error 'can't compare float and string values'.

What I wan't to achieve is:

Measure: Nettoumsatz inkl. Retouren

Exclude: Typ1 everything except Bestellung

Thank you

• 4. Re: Calculation Field Filter

sorry my language skills are lacking -

I took your post to say that you had a dimension that was a string the categorizes sales and returns into 2 groups -

I cant tell from you view what that dimension but the formula would say

[the dimension name]<>'Return'

Jim

• 5. Re: Calculation Field Filter

Sorry I'm a beginner... So what is the complete formula for my issue?

• 6. Re: Calculation Field Filter

I will write a formula for superstore data -

this filter says if the category is NOT equal (<>) to Furniture

it is a true false filter that will filter out all data tied to Furniture

then

Jim

If this posts assists in resolving the question, please mark it helpful or as the 'correct answer' if it resolves the question. This will help other users find the same answer/resolution.  Thank you.

• 7. Re: Calculation Field Filter

I added a new screenshot (see above) I don't want to add a filter, I want to create a calculate field which gives me a special result

• 8. Re: Calculation Field Filter

OK you have a series of things to exclude? - see below

Jim

• 9. Re: Calculation Field Filter

And how can I include the measure in this calculate field to which the formular should refer? In other words I will apply the formular below to the measure Sales, but in the caculated field.

• 10. Re: Calculation Field Filter

this will filter ALL measures in the view =

it is a boolean filter that returns a True or a False - set to true it filters out all data that meets the criteria from the data that is presented in the viz

Jim

• 11. Re: Calculation Field Filter

I don't want to filter in the view. I want to filter directly in the calculation field

• 12. Re: Calculation Field Filter

then change it as shown

Jim

• 13. Re: Calculation Field Filter

Cool thank you... is there also a formular that only INCLUDES one parameter like only 'Furniture' for example?

• 14. Re: Calculation Field Filter

I think with all I have given you - you should be able to figure that out on your own

Jim