Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
eprehu
Contributor III
Contributor III

calcul ne prend pas en compte la selection

Bonjour,

J'ai fait une selection sur le client segment = brand loyal et j'aimerais avoir le calcul existing sans qu'il prenne en compte la selection du client segment et qu'il affcihe pas 0 sur les différentes lignes 

eprehu_0-1655214158725.png

 

Ci dessous le calcuul du exsiting : 

count(distinct
aggr(nodistinct {<[Report Date]>}
If(
sum(
{<
[Report Date], $(var_Reporting_Currency), [@QV_GIV.SOURCE]={'Sales'} ,
$(var_Customer_Begin_Date_Saleforce)={"<=$(var_Date_Sel)"}, $(var_Customer_End_Date_Saleforce)={">=$(var_Date_Sel_Deb)"},
[Customer Last Purchase Date]={">=$(var_Date_Sel_Deb) <=$(var_Date_Sel)"}
>}
[Recruited Flag]
)>0
and
mod(
sum(
{<
[Report Date], $(var_Reporting_Currency), [@QV_GIV.SOURCE]={'Sales'},
$(var_Customer_Begin_Date_Saleforce)={"<=$(var_Date_Sel)"}, $(var_Customer_End_Date_Saleforce)={">=$(var_Date_Sel_Deb)"},
[Customer Last Purchase Date]={">=$(var_Date_Sel_Deb) <=$(var_Date_Sel)"}
>}
[Recruited Flag]
),
2
)=0,
[Customer Key]
),
[Customer Key]
)
)

Je sais q'uil faut mettre un [Client segment] pour ne pas prendre en compte la seelction mais  je ne sais pas ou le mettre

 

Merci!

 

Labels (1)
8 Replies
vinieme12
Champion III
Champion III

You need to ignore the selection in every aggregation function

 

 

=count({<[Client segment]>}distinct

aggr(nodistinct {<[Report Date],[Client segment]>}

If(

sum(

{<

[Report Date],[Client segment], $(var_Reporting_Currency), [@QV_GIV.SOURCE]={'Sales'} ,

$(var_Customer_Begin_Date_Saleforce)={"<=$(var_Date_Sel)"}, $(var_Customer_End_Date_Saleforce)={">=$(var_Date_Sel_Deb)"},

[Customer Last Purchase Date]={">=$(var_Date_Sel_Deb) <=$(var_Date_Sel)"}

>}

[Recruited Flag]

)>0

and

mod(

sum(

{<

[Report Date], [Client segment], $(var_Reporting_Currency), [@QV_GIV.SOURCE]={'Sales'},

$(var_Customer_Begin_Date_Saleforce)={"<=$(var_Date_Sel)"}, $(var_Customer_End_Date_Saleforce)={">=$(var_Date_Sel_Deb)"},

[Customer Last Purchase Date]={">=$(var_Date_Sel_Deb) <=$(var_Date_Sel)"}

>}

[Recruited Flag]

),

2

)=0,

[Customer Key]

),

[Customer Key]

)

)

 

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
eprehu
Contributor III
Contributor III
Author

Thanks but here the number without the filter : 

eprehu_0-1655217605453.png

And here the result when i filter on Explorer : 

eprehu_1-1655217669723.png

I don't have the 20 084 for the existing

 

vinieme12
Champion III
Champion III

You need to use the actual field name for client segment not the field label in that table

Which looks like "Segment LVMH..."

Replace [Client segment] with the actual field name

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
eprehu
Contributor III
Contributor III
Author

I used the good field 

// Repeat
count({<[Segment LVMH Label]>} distinct
aggr(nodistinct {<[Report Date], [Segment LVMH Label]>}
If(
sum(
{<
[Report Date], [Segment LVMH Label], $(var_Reporting_Currency), [@QV_GIV.SOURCE]={'Sales'} ,
$(var_Customer_Begin_Date_Saleforce)={"<=$(var_Date_Sel)"}, $(var_Customer_End_Date_Saleforce)={">=$(var_Date_Sel_Deb)"},
[Customer Last Purchase Date]={">=$(var_Date_Sel_Deb) <=$(var_Date_Sel)"}
>}
[Recruited Flag]
)>0
and
mod(
sum(
{<
[Report Date], [Segment LVMH Label], $(var_Reporting_Currency), [@QV_GIV.SOURCE]={'Sales'},
$(var_Customer_Begin_Date_Saleforce)={"<=$(var_Date_Sel)"}, $(var_Customer_End_Date_Saleforce)={">=$(var_Date_Sel_Deb)"},
[Customer Last Purchase Date]={">=$(var_Date_Sel_Deb) <=$(var_Date_Sel)"}
>}
[Recruited Flag]
),
2
)=0,
[Customer Key]
),
[Customer Key]
)
)

 

eprehu
Contributor III
Contributor III
Author

Hello do you have an idea please?

eprehu
Contributor III
Contributor III
Author

Can you help me please?

vinieme12
Champion III
Champion III

are you using a Calculated dimension?

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
eprehu
Contributor III
Contributor III
Author

What do you mean?