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

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
stephenedberkg
Creator III
Creator III

set analysis with conditions

i want to calculate the return product analysis.

sum(sales) <0 that is my return sales.

i want to take the count of total number of return product.

how to write this concept in set analysis formula?

Thanks in Advance

12 Replies
sunny_talwar

May be this:

=Count({<OrderID = {"=Sum(Sales) < 0"}>}OrderID)

alexandros17
Partner - Champion III
Partner - Champion III

Try with:

Sum(If(sum(sales)<0,1,0))

nagarjuna_kotha
Partner - Specialist II
Partner - Specialist II

Can u share sample data ?

Anonymous
Not applicable

Could you please share sample qlikview file?

Anonymous
Not applicable

maybe:

=Count (If(Aggr(Count(unit.id),Sales)>1,unit.id) )

jonathandienst
Partner - Champion III
Partner - Champion III

Set analysis is a way of filtering the data prior to evaluating the expression. In this case, I can see a filter criterion, but what would you like to filter? How are sales identified and grouped? The sum is over what dimensions?

Something like this may or may not work depending on the above.

=Sum({<Customer={"=Sum(Sales) < 0"}>} Sales)

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
gautik92
Specialist III
Specialist III

sum(if(Sum(Sales)<0,1,0))

stephenedberkg
Creator III
Creator III
Author

(Sum({<Year = {$(=Max(Year))},TransactionType={'INVOICE'},Month=>} #InvNetSales) -

Sum({<Year = {$(=Max(Year))},TransactionType={'CreditNote'},Month= >} #InvNetSales)) <0

that is my return sales

i want to calculate the count of return product

stephenedberkg
Creator III
Creator III
Author

(Sum({<Year = {$(=Max(Year))},TransactionType={'INVOICE'},Month=>} #InvNetSales) -

Sum({<Year = {$(=Max(Year))},TransactionType={'CreditNote'},Month= >} #InvNetSales)) <0

that is my return sales

i want to calculate the count of return product