Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Highlighted
Not applicable

Pivot table showing on Calculated Condition where one or more dimension filters are selected

Hi

I've a pivot table in which I only want to show the data where a user selects one or more filter value from a number of List boxes.

For example the table shows all data relating to outstanding work orders, but due to volume we want a condition met before displaying the data.

I user can select from any one of the following list boxes (used to filter the data in the table):

Month-Year Requested

Engineer

Building

Status

etc

A user could select one of more filter values, i.e. You may select 2 engineers or 1 engineer and 1 building or just 1 engineer, before the pivot table will display any data.

So the calculation condition should be true if one or more values is selected from one or more dimension and be false if no values are selected at all.

I've done this several times using only one dimension in the calculation condition i.e. "count(distinct Engineer) <>0 "

But I'm not sure if you can base this on multiple dimension at same time ?

Any ideas?

Tags (1)
1 Solution

Accepted Solutions
Partner
Partner

Re: Pivot table showing on Calculated Condition where one or more dimension filters are selected

Hi

You could try something like

GetSelectedCount(Field1) + GetSelectedCount(Field2) > 0

When I restrict something like this i would normally go off a count of returned rows > x, then change the error message to 'Too many row returns please make selections on x,y,z'

Mark

View solution in original post

3 Replies
Not applicable

Re: Pivot table showing on Calculated Condition where one or more dimension filters are selected

Hi Dan

yes you can test

count(distinct fieldA) > 1 or count(distinct fieldB) > 1 ....

but it can make it long and tricky

may be you can set up a variable like

n = count(distinct fieldA) + count(distinct fieldB) + ...

and test only if $(n) > 0

best regards

chris

Partner
Partner

Re: Pivot table showing on Calculated Condition where one or more dimension filters are selected

Hi

You could try something like

GetSelectedCount(Field1) + GetSelectedCount(Field2) > 0

When I restrict something like this i would normally go off a count of returned rows > x, then change the error message to 'Too many row returns please make selections on x,y,z'

Mark

View solution in original post

Not applicable

Re: Pivot table showing on Calculated Condition where one or more dimension filters are selected

used your first suggestion, wasn't sure about the returned rows count !!!

Thanks