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 BETWEEN

Hello,


I would like a sum of customers who depends on two condtions of sum

I made the following calculation but that does not give me the good result.


sum( {<[Code Client]={"=     sum ({<[Date Commande]={"">=$(=vDate24mois) <=$(=vDateFinSeg)""}>} Occurrence_Cde )>2  and 

sum ({<[Date Commande]={"">=$(=vDate24mois) <=$(=vDateFinSeg)""}>} Occurrence_Cde )<=5 "}>} Occurrence_Client )



Can you help me? Thank you

1 Solution

Accepted Solutions
sunny_talwar

May be you need this

=Sum({<[Code Client]={"=Sum ({1<[Date Commande]={"">=$(=vDate24mois) <=$(=vDateFinSeg)""}>} Occurrence_Cde) > 2 and Sum ({1<[Date Commande]={"">=$(=vDate24mois) <=$(=vDateFinSeg)""}>} Occurrence_Cde )<= 5"}, [Date Commande]={">=$(=vDate24mois) <=$(=vDateFinSeg)"}>} Occurrence_Client)

View solution in original post

15 Replies
Anil_Babu_Samineni

Expression sees okay, What it can be used of 2 double quotes in your nested analysis?

Please add me Anil_Babu_Samineni to interact faster when reply back. Speak low think High.

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
sunny_talwar

Have you tried to create a chart with Code Client as a dimension and these two expressions to see if any of the code client meet the criteria?

=Sum({<[Date Commande]={"">=$(=vDate24mois) <=$(=vDateFinSeg)""}>} Occurrence_Cde) > 2

=Sum({<[Date Commande]={"">=$(=vDate24mois) <=$(=vDateFinSeg)""}>} Occurrence_Cde) <= 5

Anonymous
Not applicable
Author

excuse me I did not understand your question.The only thing that is used between the quotes are notions of dates

Anonymous
Not applicable
Author

yes, and I have clients who meet both criteria


seg.JPG


thanks

sunny_talwar

If that is the case, then I don't see why it isn't working.... Can you add this expression to the table above

Sum({<[Code Client] = {"=Sum({<[Date Commande] = {"">=$(=vDate24mois) <=$(=vDateFinSeg)""}>} Occurrence_Cde ) > 2 and Sum({<[Date Commande] = {"">=$(=vDate24mois) <=$(=vDateFinSeg)""}>} Occurrence_Cde) <= 5"}>} Occurrence_Client)

Anonymous
Not applicable
Author

too bad  but it doesn't work

thanks

Anil_Babu_Samineni

Can you share application to investigate where this not working?

What are you getting when you use this?

Sum({<[Code Client] = {"=Sum({<[Date Commande] = {">=$(=vDate24mois) <=$(=vDateFinSeg)"}>} Occurrence_Cde ) > 2 and Sum({<[Date Commande] = {">=$(=vDate24mois) <=$(=vDateFinSeg)"}>} Occurrence_Cde) <= 5"}>} Occurrence_Client)

Please add me Anil_Babu_Samineni to interact faster when reply back. Speak low think High.

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
sunny_talwar

What does it show in the chart? Image? Better still, can you share a sample?

Anonymous
Not applicable
Author

here is a lighter version of the model. It's weird the calculation is unstable when I open the number of clients that meet the criteria is 2 and when I click on a client it goes to 4

thank you for your help

Capture.JPG !