# Qlik Sense App Development

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

Labels (4)