Qlik Community

Qlik Sense App Development

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

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

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

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)