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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Want a condition to find the sum of a field with group and check it with a condition and then sum it

Dear All

I am new to Qlikview. I connect Qlikview with our Oracle database and develop some basic reports. Now in a report i fetch a table with fields

COND,BROW,MASTERID,BALAMOUNT,BALDATE,BRANCHMASTID

Along with this table lot other tables used to list the balance sheet of the company. I use chart Pivot table to list the result. I add the fields Brow in the Pivot table and in the expression SUM(IF(COND='NO',IF( BALDATE <= ToDate,  BALAMOUNT, 0 ),0)) Where Todate is a

Slider/Calender field. The expression is ok for NO condition.

Now the problem is......

For Yes condition. I want to sum the BALAMOUNT with the group by of BROW,MASTERID,BRANCHMASTID and filter the result with the value greater than zero. then sum the result with BROW. I try Aggr but cant know how to do it.

Thanks in Advance for your replies.

1 Reply
rupamjyotidas
Specialist
Specialist

Can you share a sample app

Aggr(if(len(BALAMOUNT)>0,Sum(BALAMOUNT)),BROW,MASTERID,BRANCHMASTID)

or if you have the dimension in pivot table as BROW,MASTERID,BRANCHMASTID

Then only this will do

if(len(BALAMOUNT)>0,Sum(BALAMOUNT))