Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Announcements
BARC’s The BI Survey 19 makes it official. BI users love Qlik. GET REPORT
Highlighted
pranabdee
New Contributor II

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

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

Tags (2)
1 Solution

Accepted Solutions

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

Try this, If this is in KPI? PFA

=Money(Sum({<[Risk Score] = {">5"}>} Revenue),'$#,##0')



Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)

View solution in original post

2 Replies

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

Try this, If this is in KPI? PFA

=Money(Sum({<[Risk Score] = {">5"}>} Revenue),'$#,##0')



Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)

View solution in original post

pranabdee
New Contributor II

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

Yes, this is for a KPI.

Thanks Anil, this works. Appreciate it.