Forum Discussion
PatriceGREN
7 years agoRegular Visitor
Using Dateadd
Hi, I can t use the DATEADD function correctly. DATEADD(HISTORIQUE[DateFinPeriodeEssai1],-nbjprevenance,DAY) -nbjprevenance = variable if I put 0 in place of the variable, I get the right dates...
- 7 years ago
Hi,
After many tests, I tried this syntax:
HISTORIQUE[DateFinPeriodeEssai1] - nbjprevenance
and it works.
amitchandak
Super User
7 years agoIn case you plan to use a slicer, you can have a measure. Here "Add to date" is a slicer
Date from slicer = Var date1='Add To Date'[Add To Date Value] return CALCULATE(maxx(Sales,DATEADD(Sales[Order_Date],date1,DAY)))
You want to add static value once as column
Date from slicer col = Var date1=1 return DATEADD(Sales[Order_Date],-1*date1,DAY)