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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
faroukfrk
Contributor III
Contributor III

using a set analysis as a modifier to another set analysis

Hello community,

I have an issue how to make a complex expression which is made of Two parts

the first part is "the stock at risk of lapse" whose set analysis is  :
 
Sum({<[TypeDate]={DateEntreeStock},FSST_Type={StockInterne},[FSST_NBJOUR (compartimentée)]={"[0,15)"}>}
FSST_Quantite_Quant*FSST_Cout_Revient)
 
There is also "The  Stock Rotation Rate" whose expression is
 
(Sum( {$<date = {">=$(=Min(FQST_Date_Stock))<=$(=Max(FQST_Date_Stock))"} >} FQST_Quantite *FQST_Cout_Revient )
-
Sum( {$<date = {"$(=Min(FQST_Date_Stock))"} >} FQST_Quantite *FQST_Cout_Revient ))
/
((Sum( {$<date = {"$(=Min(FQST_Date_Stock))"} >} FQST_Quantite *FQST_Cout_Revient)
+
Sum( {$<date = {">=$(=Min(FQST_Date_Stock))<=$(=Max(FQST_Date_Stock))"} >} FQST_Quantite *FQST_Cout_Revient))
/2)
 
Now I want to make the second part which is "the value of the stock at risk of lapse with a strong rotation"
 
which means that I extract the products that have the maximum rotation and calculate their value: "FQST_Quantite (Products with max rotation) *FQST_Cout_Revient"
 
the general idea is like the next expression :
Sum( {<Product={list of products with max rotation } >} FQST_Quantite *FQST_Cout_Revient))
 
Thank you in advance Community
Labels (1)
1 Reply
Anil_Babu_Samineni

I am not sure, I understand the business. But you could try this way?

Sum( {<Product=P({<FQST_Date_Stock = {$(=Concat(DISTINCT Chr(39)&FQST_Date_Stock&Chr(39), ','))}>} Product)>} FQST_Quantite *FQST_Cout_Revient))

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful