Qlik Community

Qlik Sense App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

Announcements
Qlik® Product Spotlight: Discover what’s possible. Get more from our products.
See for yourself. Register today.
Highlighted
faroukfrk
Not applicable

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
1 Reply
loveisfail
Not applicable

Re: using a set analysis as a modifier to another set analysis

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))

Life is so rich, and we need to respect to the life !!!