1 2 Previous Next 17 Replies Latest reply on May 5, 2016 4:59 AM by mounika.nagina.0

# Discussion on Measure as A Quick Filter instead of Slider

I have Column name Called 'Line Value' which is a Measure,i would like to use it as a Quick filter instead of Slider i want A Multiple Selection Filters,and the multiple selction Should be Of Range From"0-10M,10M to 20M, up to 500 M and caluculation should be based on Sum(Line Value).i have written A calculation as Below

str(if sum([Line Value])< 10000000 then '0-10m'

elseif

STARTSWITH(str(sum([Line Value])),'1') or  STARTSWITH(str(sum([Line Value])),'19') then '10-20M'

elseif STARTSWITH(str(sum([Line Value])),'2') or  STARTSWITH(str(sum([Line Value])),'29') then '20-30M'

elseif STARTSWITH(str(sum([Line Value])),'3') or  STARTSWITH(str(sum([Line Value])),'39') then '30-40M'

elseif STARTSWITH(str(sum([Line Value])),'4') or  STARTSWITH(str(sum([Line Value])),'49') then '40-50M'

elseif STARTSWITH(str(sum([Line Value])),'5') or  STARTSWITH(str(sum([Line Value])),'59') then '50-60M'

elseif STARTSWITH(str(sum([Line Value])),'6') or  STARTSWITH(str(sum([Line Value])),'69') then '60-70M'

else null

END)

But i am Not able to use it as Quick Filter,currently i am USing 9.1 version.

Is there any other Calculation we can Use for this Requirement.and it should be based on Sum(Line Value) and also it should be Multiple select Filter.

Can Any one of you help me,i am stuck with this requirement.Apart from this Calculation so you know any Other Calculation??

Message was edited by: Mounika Nagina

• ###### 1. Re: Discussion on Measure as A Quick Filter instead of Slider

Why not just create bins of the measure (right click on the measure in the data pane to create the bin) instead of all that hard work with the strings.  The strings will also slow your performance.

• ###### 2. Re: Discussion on Measure as A Quick Filter instead of Slider

if i create Bin,i am not getting range like "0-10M",10M-20M" just it will show  range like

10M

20M

but i want to show as

1-10M

10M-20M

• ###### 3. Re: Discussion on Measure as A Quick Filter instead of Slider

You can alias those.

• ###### 4. Re: Discussion on Measure as A Quick Filter instead of Slider

But how to Create Bin Based on Sum(Line Value)?

• ###### 5. Re: Discussion on Measure as A Quick Filter instead of Slider

You can use LOD fixed  {sum([Line Value])}  and create the bins off that, but this will ignore the level of detail in the view.  You can add this level of detail in your fixed calc, but I'm not sure to what level of detail you want to sum at.

• ###### 6. Re: Discussion on Measure as A Quick Filter instead of Slider

I have created a similar calculated field to you and can use it as a multi select filter. It should be a blue (discrete) measure. It sounds strange you're being presented with a continuous green measure. Can you provide a twbx showing this?

• ###### 7. Re: Discussion on Measure as A Quick Filter instead of Slider

Ignore the Level of Detail insense? can you please explain in Brief  i have max value of Sum (585,850,750)

• ###### 8. Re: Discussion on Measure as A Quick Filter instead of Slider

Level of detail meaning what dimensions are you summing from?    What dimension is the max 585 Mil based off?

• ###### 9. Re: Discussion on Measure as A Quick Filter instead of Slider

Also, what version of Tableau are you on?

• ###### 10. Re: Discussion on Measure as A Quick Filter instead of Slider

it is 9.1 Version

• ###### 11. Re: Discussion on Measure as A Quick Filter instead of Slider

Hi!

Try this calculation:
str( int( [Value] / 10000000 )*10) + "–" + str( int( [Value] / 10000000 )*10 + 10) + " M"

I attached an example with explanations.
If I understand you correctly, it'll help

UPD: Oh, I missed sum( )   =(

1 of 1 people found this helpful
• ###### 13. Re: Discussion on Measure as A Quick Filter instead of Slider

Currently i am Using 9.1 Version So i could not able to open the twbx file.can you Downgrade it?

• ###### 14. Re: Discussion on Measure as A Quick Filter instead of Slider

Hi Andrew,

The reason why I asked about versions is that Tableau 9.2 added discrete regular aggregates as a filter option, prior to that Tableau only supported  dimensions and table calculations as options for discrete pills on the Filters Shelf. See Feature Geek: Filtering by Discrete Regular Aggregate Pills in v9.2 | Drawing with Numbers for details.

On v9.1 there are two options:

1) Use a Level of Detail expression to do the binning as John Sobczak had mentioned.

2) Wrap the bin calculation in LOOKUP([your calc],0) and put that on the Filters Shelf instead. This turns it into a table calculation.

Jonathan

1 of 1 people found this helpful
1 2 Previous Next