Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Learner
Contributor III
Contributor III

Set analysis for Customer having total greater than a value

Hello ,

I am trying to write a formula in text object where i wanted the selection i.e. set analysis for parties having more than 100 qty. total. I mean i want to apply set analysis such than only parties which has sum total greater than 100 should be considered. The example is as under:

Cust. : Product  :     Qty. : Rate

A      : PSC      :     50  : 200  

A      : PSC      :     60  : 180

A      : OPC      :     50 : 220

B      : PSC      :     40 : 195

B      : PSC      :     80 : 205

B      : OPC      :     50 : 225

C     : PSC      :     40 : 195

C     : PSC      :     30 : 200

C     : OPC      :     50 : 230

I wanted to find correlation of Qty. & rate for PSC product for only the customer which has total greater than 100 i.e. cust A(110 MT) & B (120 MT), for PSC product i am using set analysis as {$< Product={'PSC'}>} but what should i use for customer greater than 100 to be selected in set analysis, so that it gives result for only customer A & B for product PSC.

Thank you,

Ashish

 

2 Solutions

Accepted Solutions
Kushal_Chawda

you need to put it in some function like below

Sum({$< Product={'PSC'},Cust={"=sum(Qty)>100"}>}Qty)

View solution in original post

sunny_talwar

Or may be this

Sum({$<Product = {'PSC'}, Cust = {"=Sum({<Product = {'PSC'}>}Qty) > 100"}>} Qty)

 

View solution in original post

7 Replies
Kushal_Chawda

try below

{$< Product={'PSC'},Cust={"=sum(Qty)>100"}

Learner
Contributor III
Contributor III
Author

Dear Kushji,

 

It is showing as "error in set modifier expression" are we missing any "{" (curly) bracket????

 

Kushal_Chawda

you need to put it in some function like below

Sum({$< Product={'PSC'},Cust={"=sum(Qty)>100"}>}Qty)

sunny_talwar

Or may be this

Sum({$<Product = {'PSC'}, Cust = {"=Sum({<Product = {'PSC'}>}Qty) > 100"}>} Qty)

 

Learner
Contributor III
Contributor III
Author

for this example it is working and giving 230 MT. But when i applied on other example i had to give Product = PSC set analysis in cust= also.....................

Learner
Contributor III
Contributor III
Author

Thank you very much Sunnyji...............

Learner
Contributor III
Contributor III
Author

Thank you very much Kushji.........