# QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Join us at the Cloud Data and Analytics Tour! REGISTER TODAY
cancel
Showing results for
Search instead for
Did you mean:  Contributor III

## Sumif function

Hi Guys!

Just trying to figure out the sumif equivalent in Qlikview.

From the forum I understood, it's =sum(if(.....

However I'm having some difficulties. So my aim is to get the total Net Contribution (NETCN) per account group.

I've followed all the steps on the forum, but for some reason the formula isn't working. Anyone has an idea?

=sum(if([Account Group], sum({<GL_1={NETCN},Dimension={ACT}>}Data)))

10 Replies  MVP

Take a straight table:

Dimension: [Account Group]

Exp: sum({<GL_1={NETCN},Dimension={ACT}>}Data)

If this is not what you want. Try to share a sample data and explain expected output against that.  Contributor III
Author

Ah sorry, I'm trying to set up a waterfall so it needs to be in a graph. After figuring out the sumif function in Qlikview I'll add another sumif behind it, getting a standard rate per bottle sold

=sum(if([Account Group], sum({<GL_1={NETCN},Dimension={ACT}>}Data)))  /

sum(if([Account Group], sum({<GL_1={VOL},Dimension={ACT}>}Data)))  MVP

What is your dimension in the chart? Could share your sample app?  Partner

Have you tried using:

Sum({<GL_1={'NETCN'},Dimension={'ACT'}>}Data) / Sum({<GL_1={'VOL'},Dimension={'ACT'}>}Data)  Contributor III
Author I have nothing yet, I'm trying to set up something similar as above  Creator

Hi

I think its best to deal it in the Script

sumif in scripts  MVP

Try to share the excel file so that we can work on it to help you.  Contributor III
Author

Trying to send an excel file here, but doesn't work... ill try to see if I can add the sumif formula in the script  Partner

Hi,

if you are trying to use "sum(if(" then the syntax is this: sum(if(condition,then, else))

in our case that syntax will be: sum(if(  GL_1='NETCN' and DIMENSION='ACT', Data))

if the if-clause is true then it will give as result the values from the field "Data" and then it will be sum(Data).

the other examples you have been given already are set analysis

Hope it helps,

Andrew 