문제

I have a parameter and a calculated field

Parameter        - "Hierarchy" (which is a string - '1', '2', '3')
Calculated Field - "Division"  (which is based on the Hierarchy chosen)
Case 1 display '' (nothing)
Case 2 and 3 show Dimension A

My question - when I select a value 'X' from Division, when the parameter is set to 2 or 3. The value 'X' remains, when I switch to 1. I would like this to default to the 'All' values.

I don't have data for 'X' at level 1 hierarchy. So, my graphs shows nothing, which isn't good.

Does anyone know how to script this to default to 'All' when I revert selection to '1' (and I don't mean the string 'All', I mean the ALL values selection used in filtering.

Thanks,

gemmo

도움이 되었습니까?

해결책 2

I don't think tableau have this level of programmability. In short - can't be done at the moment. Research didnt bear any fruit

다른 팁

Assuming you are using quick filters, try setting your quick filter to display "Only Relevant Values" instead of "All Values in Database". I think that's the default setting, so that's likely not the complete solution to your problem -- but its something you can check quickly before diving deeper.

Another thing to check - what data source are you using? Some data sources have limitations, in particular, the MS Jet engine used for MS Access, Excel and text files apparently doesn't handle sets in filters (among other limitations). Tableau announced at their 2013 customer conference that they planned to replace the Microsoft Jet Engine in Tableau 8.2 (again -- I'm not sure that's your issue here)

I was able to do this but it took an extra calculated field to make it work. Inside your parameter add the Value "All" and Display as "All".

Then create a calculated field with a case statement that returns 'All' for every value in your field's set. Something like this for you:

CASE Parameter
    WHEN 1 THEN 'All'
    WHEN 2 THEN 'All'
    WHEN 3 THEN 'All'
END

I named it _All. Then add to or create a T|F calculated field to add to your filter pane. Add this to the field.

  [_All] = [Parameter]

You should see then be able to select "All" in your parameter control and have it show all values.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top