Forum Discussion
Using Dateadd
- 6 years ago
Hi,
After many tests, I tried this syntax:
HISTORIQUE[DateFinPeriodeEssai1] - nbjprevenance
and it works.
PatriceGRENcan you provide details on how you are calculating nbjprevenance variable? Also do you have date dimension in your model on which you are performing this DateADD function?
- PatriceGREN6 years agoRegular Visitor
Hi,
datePrevenancePeriodeEssai1 =
var nbj = HISTORIQUE[NombreJourDebutContrataDateJour]
var nbjprevenance =
switch(TRUE(); -- donne le nombre de jours de prévenance à respecter
nbj <8 ; 1;
and(nbj > 8 ; nbj <= 30);2;
and(nbj >30 ; nbj <= 90);15;30 )
return
DATEADD(HISTORIQUE[DateFinPeriodeEssai1];-nbjprevenance;DAY)
for the "Date Dimension", I'll look. This is a model that is available to me, I don't know yet everything in it.
- PatriceGREN6 years agoRegular Visitor
- PatriceGREN6 years agoRegular Visitor
Hi,
After many tests, I tried this syntax:
HISTORIQUE[DateFinPeriodeEssai1] - nbjprevenance
and it works.