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

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Set Analysis: Sum with multiple conditions

Hi best QV Community,

I’ve been using QlikView now for few months very smoothly without any major problem until now.

I’ve been spending a lot of time recently searching for an equivalent to (Excel) SUMIFS in QlikView using the values of a dimension as input conditions. I thought this was a straight forward task but my limited knowledge proved that I was wrong.

To illustrate the problem with a simple example:

Let’s say that we have a data set containing the following fields [Date], [Employee], [Expenditures] and [Balance] (see attached picture).  Using those fields I need to calculate the daily income for each active employee. This is a straight forward task in Excel using SUMIFS or SUMPRODUCT (See the solution in Excel in the attached picture).

So in short I need to find a way to translate: D10-SUMIFS(D:D,A:A,A10-1,B:B,B10)+C10

To something like that in QlikView:  Balance - Sum ( { <Date =Date-1, Employee= Employee> } Balance) + Expenditures

I order to create a new dimension called [Income]. I also tried to use a different kind of Sum(if(conditions)...., Balance) without any success.

I belive that there must be a way to achieve that in QlikView but my knowledge in that matter seems to be limited. I therefore deeply appreciate any help from the community.

Many thanks

21 Replies
Not applicable
Author

Many many thanks to you all. I'm very greatful for all the great answers.

My best regards to you all!

Not applicable
Author

Oh, you've noticed!.. and took that to a highter level of perfection. This can be extremly helpful!

I can't be greatful enough to you and all other community members who sent excellent solutions!

Many thanks to you all!