Bonjour,
Je cherche à avoir un calcul sans prendre en compte le champ/filtre calculation group.
Ci dessous le calcul de base :
// Recruited
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_LLY)"},
[Customer First Purchase Date]={">=$(var_Date_Sel_LLY) <=$(var_Date_Sel)"}
>}
[Recruited Flag]
)=1,
[Customer Key]
),
[Customer Key]
)
)
+
// Recruted repeat
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_LLY)"},
[Customer First Purchase Date]={">=$(var_Date_Sel_LLY) <=$(var_Date_Sel)"}
>}
[Recruited Flag]
)>1
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_LLY)"},
[Customer First Purchase Date]={">=$(var_Date_Sel_LLY) <=$(var_Date_Sel)"}
>}
[Recruited Flag]
),
2
)=1,
[Customer Key]
),
[Customer Key]
)
)
+
// Repeat
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_LLY)"},
[Customer Last Purchase Date]={">=$(var_Date_Sel_LLY) <=$(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_LLY)"},
[Customer Last Purchase Date]={">=$(var_Date_Sel_LLY) <=$(var_Date_Sel)"}
>}
[Recruited Flag]
),
2
)=0,
[Customer Key]
),
[Customer Key]
)
)
Et sans prendre en compte le filtre j'ai fait ca :
// Recruited
count
({<[Calculation Group]>}distinct
aggr(nodistinct {<[Report Date]>}
If(
sum(
{<
[Report Date], $(var_Reporting_Currency), [@QV_GIV.SOURCE]={'Sales'} , [Calculation Group],
$(var_Customer_Begin_Date_Saleforce)={"<=$(var_Date_Sel)"}, $(var_Customer_End_Date_Saleforce)={">=$(var_Date_Sel_LLY)"},
[Customer First Purchase Date]={">=$(var_Date_Sel_LLY) <=$(var_Date_Sel)"}
>}
[Recruited Flag]
)=1,
[Customer Key]
),
[Customer Key]
)
)
+
// Recruted repeat
count(
{<[Calculation Group]>}distinct
aggr(nodistinct {<[Report Date]>}
If(
sum(
{<
[Report Date], $(var_Reporting_Currency), [@QV_GIV.SOURCE]={'Sales'} , [Calculation Group],
$(var_Customer_Begin_Date_Saleforce)={"<=$(var_Date_Sel)"}, $(var_Customer_End_Date_Saleforce)={">=$(var_Date_Sel_LLY)"},
[Customer First Purchase Date]={">=$(var_Date_Sel_LLY) <=$(var_Date_Sel)"}
>}
[Recruited Flag]
)>1
and
mod(
sum(
{<
[Report Date], $(var_Reporting_Currency), [@QV_GIV.SOURCE]={'Sales'} ,[Calculation Group],
$(var_Customer_Begin_Date_Saleforce)={"<=$(var_Date_Sel)"}, $(var_Customer_End_Date_Saleforce)={">=$(var_Date_Sel_LLY)"},
[Customer First Purchase Date]={">=$(var_Date_Sel_LLY) <=$(var_Date_Sel)"}
>}
[Recruited Flag]
),
2
)=1,
[Customer Key]
),
[Customer Key]
)
)
+
// Repeat
count({<[Calculation Group]>}distinct
aggr(nodistinct {<[Report Date]>}
If(
sum(
{<
[Report Date], $(var_Reporting_Currency), [@QV_GIV.SOURCE]={'Sales'} ,[Calculation Group],
$(var_Customer_Begin_Date_Saleforce)={"<=$(var_Date_Sel)"}, $(var_Customer_End_Date_Saleforce)={">=$(var_Date_Sel_LLY)"},
[Customer Last Purchase Date]={">=$(var_Date_Sel_LLY) <=$(var_Date_Sel)"}
>}
[Recruited Flag]
)>0
and
mod(
sum(
{<
[Report Date], $(var_Reporting_Currency), [@QV_GIV.SOURCE]={'Sales'},[Calculation Group],
$(var_Customer_Begin_Date_Saleforce)={"<=$(var_Date_Sel)"}, $(var_Customer_End_Date_Saleforce)={">=$(var_Date_Sel_LLY)"},
[Customer Last Purchase Date]={">=$(var_Date_Sel_LLY) <=$(var_Date_Sel)"}
>}
[Recruited Flag]
),
2
)=0,
[Customer Key]
),
[Customer Key]
)
)
Sans que ca ne marche pas, j'ai les mêmes resultats alors que je filtre sur le calculation group.
En haut, le calcul pour ne pas prendre en compte le filtre et en bas le calcul de base
Comment cela se fait il ?
Merci