Forum Discussion
If and DateAdd not working
- 5 years ago
Hi, PBI5851
According to your description, I think the reason why the value of your calculated column displayed blank is the Dateadd() function returns a table containing a single column of date values. If you want to calculate for every column in the table, you can try this:
This is my test data:
ExpectDate = SWITCH( TRUE(), 'Primary'[User1]="Steve",'Primary'[Hiredate]+10, 'Primary'[User1]="John",'Primary'[Hiredate]+20, 0)Then change the column tyoe to “Date”, and you can get what you want, like this:
You can download my test pbix file here
More info about Dateadd() function
If this result is not what you want, you can post some sample data(without sensitive data) and your expected result.
How to Get Your Question Answered Quickly
Best Regards,
Community Support Team _Robert Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
youre trying to use time intellegence functions on a column with dates, you should use your time intellegence functions on a date table. time intell req contiguious dates.