question

LearnerDAX-1876 avatar image
0 Votes"
LearnerDAX-1876 asked LearnerDAX-1876 commented

Relative Date in SSRS

Hi

I am trying to create a relative date calculated column which is a difference between dataset last refresh date and a date column. This column is already being calculated in SAP BO with below formula
= RelativeDate(lastExecutionDate(), [Date Column], DayPeriod)

tried using DateAdd function in SSRS but did not work. Any suggestions....

Thanks in advance

sql-server-reporting-services
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

ZoeHui-MSFT avatar image
0 Votes"
ZoeHui-MSFT answered LearnerDAX-1876 commented

Hi @LearnerDAX-1876,

Suppose that you want to calculate the number of days between the date with last execution Date.

Try with below expression:

 =DateDiff("d",Fields!ExecutionDate.Value,Fields!YourDate.Value)

87134-screenshot-2021-04-13-093842.jpg

If I misunderstand your need, please incorrect me.

Regards,
Zoe


If the answer is helpful, please click "Accept Answer" and upvote it.

Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

What can I do if my transaction log is full?--- Hot issues November

How to convert Profiler trace into a SQL Server table -- Hot issues November





· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi Zoe,

Thanks for the response.

Can I get date information too here...

For Example,

Last Execution date is 01/06/2021, and there is a no. of dates column which has value of 6. So, now I want to find date which is 6 days from last execution date...

Please advise...

0 Votes 0 ·

Hi Zoe,

Did DateAdd, got the required answer.

Thanks

0 Votes 0 ·