Qlik Community

Qlik Sense App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

Announcements
Qlik® Product Spotlight: Discover what’s possible. Get more from our products.
See for yourself. Register today.
Not applicable

Define a variable as a filter

Hi !

I have inputs/outputs table which I want to analyze.

Those inputs/outputs are distributed in Unities:

Inputs:

Unity | [Nb of inputs] | Source

U1     | 3                   | Outside

U1     | 4                   | Other Unity

U2     | 2                   | Outside

U2     | 5                   | Other Unity

As you can see it, an input can come from another Unity.

The problem is, when I analyze my inputs with the vision of all unities, I don't want the inputs from others unity to be considered.

I could use expressions like

IF(count(Unity)=count(TOTAL Unity),

Sum({<Source={'Outside'}>}[Nb of inputs]),

Sum([Nb of inputs]))


but I would have to put it in all the expressions of all my graphs, and the code would become hard to understand...

My question is: is there a way to define a variable that, when count(Unity)=count(TOTAL Unity) applies a filter on the Source ?

Thank you