Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

tinkerz1
Contributor II

Using a set expression in a pivot table embedded in an if statement

Hi,

I have built an IF expression for a pivot table that is bascially a gate, I want the expression to trigger a count based on a table that is not in the dimensions.

So I have written a set expession

Count({$<[Function]={"ABC"}>}[ID])

(I have tested in a seperate pivot table with no dimensions and it works.)

But it won't trigger, can I embed a set expression inside a pivot table expression?

Any ideas?

 

=if(num#([Dates2])=num(Date('01/09/2015','DD/MM/YYYY')),[Data2],
if(num#([Dates2])<>num(Date('01/09/2015','DD/MM/YYYY')) and wildmatch([Action Plans2],'*Draft*','*Open*'),
if(len([Data2])>0,[Data2],
if(Count({$<[Function]={"ABC"}>}[ID])>0
,'D','E')),
Data2]))

4 Replies
Partner
Partner

Re: Using a set expression in a pivot table embedded in an if statement

does it work without the if?

tinkerz1
Contributor II

Re: Using a set expression in a pivot table embedded in an if statement

No it does not work without the IF.

I think the problem is Qlikview wants to Dimension the result and as the fields are not linked it returns Zero.

Any ideas?

Partner
Partner

Re: Using a set expression in a pivot table embedded in an if statement

set analysis is evaluated once for the whole chart and not per row or dimension

a sample app would help Neil, if possible

Partner
Partner

Re: Using a set expression in a pivot table embedded in an if statement

Is it me only being moderated, or everybody?