Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

Announcements
Customers, Partners & Luminaries only: You're invited to a Data Analytics Roadmap session. Read More
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
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
Highlighted

Hi,

Check with this

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

Celambarasan

View solution in original post

7 Replies
Highlighted
Specialist II
Specialist II

Hi,

store sum(invoice fllag) in a seperate variable

Then use syored variable here in the expression

Sivaraj S

Highlighted
Not applicable

Take sum(Invoiceflag) in a variable say var1

and use this:

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

Highlighted
Not applicable

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

Highlighted
Creator
Creator

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.

Highlighted
Not applicable

Hi  hamishimrie,

just use this

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

it works!!

please find attachement eee.qvw

Warms Regards,

Anant Dubey

Highlighted

Hi,

Check with this

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

Celambarasan

View solution in original post

Highlighted
Partner
Partner

hi Celambarasan,

Is it possible to

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


something like that.


Thx.


Best Regards,

Louis