Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
zagzebski
Creator
Creator

Enable condtion on dimension

I want to create a condition (in enable condition from the dimension tab in a pivot table).  I have the following table. I have a list box for the MenuSelection field. Depending on what is selected the dimension in the pivot table will (or won't be enabled):

DynamicDimension table:

MenuSelection     Dimension

Revenue              Branch

Revenue              Department

Revenue              Line of Business

Expense              Branch

Expense              Department

So if the user selects "Revenue" (in the List Box) then in the pivot table Branch, Department and Line of Business will be enabled, but if Expense is selected (in the List Box) then only the Branch or Department dimensions will enabled but the Line of Business dimension field will not be enable because it is not associated with Expenses

Thanks in advance for any help,

Steve

5 Replies
Anonymous
Not applicable

Looks like you don't need any condition on Branch and Department dimensions, but need only for Line of Business.  Condition will be:

MenuSelection = 'Revenue'

zagzebski
Creator
Creator
Author

Actually that table is just a small representation of many more records. For example I want to set up a dimension for Branch and maybe 7 out of 10 selections in the ListBox are related to Branch. If one of those is selected then Branch will be enabled. Some kind of aggr function or something?

Steve

Anonymous
Not applicable

There is no need to over-engineer...  Try this, for each dimension:

match(MenuSelections, 'Revenue','Expense', '' ...)

Different list for each dimension.

Kushal_Chawda

Go to the chart Properties -> Dimension tab

For Dimension Line of Business put below condition

=if(GetSelectedCount(MenuSelection)>0,

if(GetFieldSelections(MenuSelection)='Revenue',1,0),1)

For Dimensions Branch, Department put below condition

(if(GetSelectedCount(MenuSelection)>0,

if(GetFieldSelections(MenuSelection)='Revenue',1,0),1)) or

(if(GetSelectedCount(MenuSelection)>0,

if(GetFieldSelections(MenuSelection)='Expense',1,0),1))

Not applicable

use this as calculated dimension:

if(match(Pivot_Table_Dimension,$(=chr(39)&Concat(Dimension ,chr(39)&','&chr(39))&chr(39))),Pivot_Table_Dimension)

and then suppress null values

sample is attached