Skip to main content

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Action-Packed Learning Awaits! QlikWorld 2023. April 17 - 20 in Las Vegas: REGISTER NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
hamishimrie
Creator
Creator

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

Take sum(Invoiceflag) in a variable say var1

and use this:

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

Not applicable

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

hamishimrie
Creator
Creator
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

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

tiklam_dynasys
Partner - Creator
Partner - Creator

hi Celambarasan,

Is it possible to

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


something like that.


Thx.


Best Regards,

Louis