Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
On Demand Webinar: See Why Thousands of QlikView Users Have Switched to Qlik Sense. REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
bilionut
Contributor III
Contributor III

sum in Set Analysis

Hi,

I have to sum all the values with Satus = 'Active' and those with Status='Sold' and IDFact not NULL

LOAD *

Inline [

Dim,IDFact,Value,Status

AA,1,10,Active

BB,,20,Active

CC,,30,Sold

DD,4,40,Sold

];

How do I do that in Set Analysis?

Tanks,

1 Solution

Accepted Solutions
vhespinog
Contributor III
Contributor III

Hi

May be something like this

=sum({$<Status = {'Active','Sold'}, idFact ={"=len(trim(IDFact))>0"} >}Value)

View solution in original post

4 Replies
vhespinog
Contributor III
Contributor III

Hi

May be something like this

=sum({$<Status = {'Active','Sold'}, idFact ={"=len(trim(IDFact))>0"} >}Value)

View solution in original post

bilionut
Contributor III
Contributor III

Your expression brings all the values. I need to exclude only those values that have Status=Sold and IDfact null

The condition must be something like that:

(Status = {'Active'} ) or (Status='Sold' and IDFact not NULL)


In the end I found  that this works

sum({<IDFact={"=len(trim(IDFact))>0"}> * <Status={'Sold'}>+<Status={'Active'}>} Value)

tiklam_dynasys
Partner
Partner

Hi,

It is possible to be something like below

sum({$<Status = {'Active','Sold'}, idFact ={"=len(trim(IDFact))>0 and len(trim(IDFact))<5"} >}Value)


Best Regards,

Louis