6 Replies Latest reply on Feb 18, 2016 9:10 AM by Shinichiro Murakami

# Control Filter using Parameter

I'd like to control Category Filter using Parameter.

Let's say Parameter has four values (No1, No2, No3, and No4).

If I choose Parameter.No1, then it gives me the sum of the Count of Category A (30).

Parameter.No2 gives me the sum Category A and B (60).

Parameter.No3 give me  the sum of Category C (40).

Parameter.No4 give me the sum of Category D (110).

How should I write the formula in the Calculated field?

CategoryCount
A

10

A20
B30
C40
D50
D60

Thank you for your help.

Best regards,

Akiko Horecka

• ###### 1. Re: Control Filter using Parameter

Hi Akiko-

Calculated Field

IF [Parameter 1] = "B"

THEN IF [Category] = "A" OR [Category] = "B"

THEN "OK" END

ELSEIF [Parameter 1] = [Category] THEN "OK"

END

9.2 workbook attached.

1 of 1 people found this helpful
• ###### 2. Re: Control Filter using Parameter

Hi,

Here is an example.

if  [Parameter 1] = "1"

then sum (if [Category]="A"

then [Count] END)

elseif  [Parameter 1] = "2"

then sum (if [Category]="A" or [Category]="B"

then [Count] END)

elseif  [Parameter 1] = "3"

then sum (if [Category]="C"

then [Count] END)

elseif  [Parameter 1] = "4"

then sum (if [Category]="D"

then [Count] END)

END

1 of 1 people found this helpful
• ###### 3. Re: Control Filter using Parameter

You did it 4 minutes earlier....

Shin

• ###### 4. Re: Control Filter using Parameter

Hi

I am new to tableau and looking for help inusing calculated fields.I need all SA's total and grand total in the bottom after SA and without grouping each entity shd be displayed as row on top of totals,All others at bottom is for remaining other than shown in list.

Let me know if this can be done i nsingle sheet.Thanks for the help.

• ###### 5. Re: Control Filter using Parameter

These are exactly what I was looking for. Thank you so much for your help, Adam and Shin!

Akiko

• ###### 6. Re: Control Filter using Parameter

You are very welcome and happy to hear I could help you.

Thanks,

Shin