1 Reply Latest reply: May 3, 2018 4:43 PM by Serina Wong RSS

    Qlik Sense: How to filter aggregated values

    Daniel Chan

      Hi all, I am a beginner of Qlik Sense.

       

      I would like to apply filters on the expressions below:

      1. by line item

      if((sum([Amount])/sum([Quantity]))<Sum([Cost]),'Y','N')

       

      2. by product

      if((sum(total<[Material]>[Amount])/sum(total<[Material]>[Quantity]))<Sum([Cost]),'Y','N')

       

      The target is to let user to select "Y"/"N" to filter out records.

       

      I have tried to use formulas below but the results were incorrect as there was no key to identify record.

      aggr(if((sum([Amount])/sum([Quantity]))<Sum([Cost]),'Y','N'),Material)

      aggr(if((sum(total<[Material]>[Amount])/sum(total<[Material]>[Quantity]))<Sum([Cost]),'Y','N'),Material)


      It would be appreciated if anyone can give me some suggestions.

      Thank you!