Forum Discussion
Anonymous
6 years agoNot applicable
If statement for a calculated column
Hi, I have a column added into my table which is using a datediff that says how many days between 2 dates , Age =datediff('Table1'[Date A],'Table 1'[Date 2],DAY) However I am trying to creat...
- 6 years ago
Hi Anonymous
if you use DAX calculated column your new column will look like
Test = MIN([Age], 7)you also can use this technique
Age = var _dd = datediff('Table1'[Date A],'Table 1'[Date 2],DAY) RETURN IF(_dd < 7, 7, _dd)
az38
6 years agoCommunity Champion
Hi Anonymous
if you use DAX calculated column your new column will look like
Test = MIN([Age], 7)
you also can use this technique
Age =
var _dd = datediff('Table1'[Date A],'Table 1'[Date 2],DAY)
RETURN
IF(_dd < 7, 7, _dd)
- Anonymous6 years agoNot applicable
The first one seems to have worked perfectly, thank you.