Search code examples
qlikviewqliksense

Conditional formula in qlik


I want to create a condiditional formula for some charts in qliksense.

I want to calculate the average for a KPI ATD , if a certain condition of another column is valid, column W = 1. So for example:

Class  W   ATD
A      1   1
A      1   3
A      0   1
B      1   1

Should lead to for class A: Condi.Avg= 2

In general it should be then in a new table (for W=1):

Class Condi.Avg
A     2
B     1

Right now I have:

Avg({<W= {1}> ATD)

which leads to a column in my charts with -:

enter image description here

How can I change this?


Solution

  • I think there is a typo in your expression.

    Avg({<W = {'1'}>} ATD)
    

    This should provide some result.

    Edit (from the author):

    Avg({< [W] = {'1']>} ATD)
    

    is working