Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
mustafaelryah
Creator
Creator

Calculation problem

Hi All,

     I have 2 Tables

1. Liabilities Table contains the below Columns

Account ID

MRU

Type Category

Balance

2. MRU Table contains the below Columns

MRU

Department

City

District

* The MRU Lining the 2 tables

**********************************************

My question that I can't get the summation of balances  if the balance is more than 400 for each department

but I can get this summation for Account ID.

I made Chart . I set Department as dimension and the expression is  if( Balance> 400, Sum(Balance))

this expression give me results when the dimension is Account ID but it gives no results when  the dimension is Department.

Can you help me plz.

Regards

4 Replies
maxgro
MVP
MVP

maybe you need an aggr by dept

sum(if(aggr(sum(Balance),Department)>400, aggr(sum(Balance),Department)))

MK_QSL
MVP
MVP

You need to Aggregate SUM(Balance) by Department as suggested by Massimo Grossi.

In case if you want the same by Set Analysis, use below

SUM({<Department = {"=Aggr(SUM(Balance),Department)>=400"}>}Balance)

mustafaelryah
Creator
Creator
Author

Thanks All.

Not applicable

Hi

You can try with Aggr Function

Sum(if(aggr(sum(Balance),Department)>400, aggr(sum(Balance),Department)))