2 Replies Latest reply: Oct 25, 2018 11:50 PM by Pranab Deepak RSS

    How to aggregate values of one table based on values of another table?

    Pranab Deepak

      Hello everyone! I'm fairly new to Qlik Sense. I need to do the following:

      I have two tables, Risk and Revenue.

      Risk:

      Serial NoSupplier NameRisk Score
      1A

      8

      2B4
      3C10
      4D2

      The unique id in this table is the supplier name

      Revenue:

      Serial No.ProductSupplier NameRevenue
      1123A$10
      2234A$20
      3156D$1

      The unique id in this table is the product number. But the tables are linked by the supplier name.

       

      I want to calculate a KPI of sum of revenue for all products whose supplier has a risk score greater than 5.

      The logic I am using is if([Risk Score] > 5, Sum([Revenue]))

       

      I am not getting any answer from my code. The correct answer in this case should be $30 dollars.

       

      Any pointers is greatly appreciated.

       

      Best,

      Pranab