Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Bonjour,
Comment puis je faire deux if. Sommer les deux conditions et faire : si cette sum =2 => true sinon false
1ere condition :
=if(
[Store Channel] = 'Physical Store' or [Store Channel] = 'Outlet', 1,0
)
2em condition :
=if(
[Store Channel] = 'E-commerce', 1,0
)
Je dois calculer un client qui a fait une transaction (le store channel) en physical store (ou en outlet) et sur du ecommerce
It doesn't work
Doesn't work as in
Can you post a screenshot of your data model?
And a screenshot of the chart you are trying it in and the expression you used
Voici une piste à adapter au script bien sûr :
//Récupération des clients dont Store Channel vaut 'Physical Store' ou 'Outlet'
TMP_1_CUSTOMERS_FILTRE:
load distinct
[Customer Key],
1 as flag
resident your_table
where WildMatch([Store Channel], 'Physical Store', 'Outlet');
//Récupération des clients dont Store Channel vaut'E-commerce'
Concatenate (TMP_1_CUSTOMERS_FILTRE)
load
[Customer Key],
1 as flag
resident your_table
where WildMatch([Store Channel],'E-commerce');
left join (your_table) //On ramène le flag à la table principale
load
[Customer Key],
if(flag >= 2, 'true', 'false') as [Customer Flag]
;
load
[Customer Key],
sum(flag) as flag
resident TMP_1_CUSTOMERS_FILTRE
group by [Customer Key];
drop table TMP_1_CUSTOMERS_FILTRE;