Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Sum Conditional in Set Analysis

HI,

This statement seems to not be working at all

=count({<{$(=sum(InvoiceFlag))}={'$(>1)'}>} distinct  CompanyID)

The aim of the expression is to count the CompanyID's where the sum of the invoice flags is greater then 1.

Regards

1 Solution

Accepted Solutions
CELAMBARASAN
Partner - Champion
Partner - Champion

Hi,

Check with this

=count({<CompanyID={"=sum(InvoiceFlag)>1"}>} distinct  CompanyID)

Celambarasan

View solution in original post

7 Replies
sivarajs
Specialist II
Specialist II

Hi,

store sum(invoice fllag) in a seperate variable

Then use syored variable here in the expression

Sivaraj S

Not applicable
Author

Take sum(Invoiceflag) in a variable say var1

and use this:

=count({<$(var1)={'>1'}>}distinct  CompanyID)

Not applicable
Author

=count({<var1'>1'>}distinct CompanyID)

Anonymous
Not applicable
Author

Hey Acrobat,

Thanks for this input.

This solution doesnt work, I think it is because the sum in the variable is used across all of the companies whilst the actual expression is for one company.

That is why I tried to package this all into one expression with set analysis.

Not applicable
Author

Hi  hamishimrie,

just use this

=count( {<InvoiceFlag={ '>1'} >}    CompanyId) 

it works!!

please find attachement eee.qvw

Warms Regards,

Anant Dubey

CELAMBARASAN
Partner - Champion
Partner - Champion

Hi,

Check with this

=count({<CompanyID={"=sum(InvoiceFlag)>1"}>} distinct  CompanyID)

Celambarasan

Anonymous
Not applicable
Author

hi Celambarasan,

Is it possible to

=count({<CompanyID={"=sum(InvoiceFlag)>1 & < 5" }>} distinct  CompanyID)


something like that.


Thx.


Best Regards,

Louis