Relative Date in SSRS

Learner DAX 41 Reputation points
2021-04-12T18:14:53.513+00:00

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
SQL Server Reporting Services
A SQL Server technology that supports the creation, management, and delivery of both traditional, paper-oriented reports and interactive, web-based reports.
3,061 questions
0 comments No comments
{count} votes

Accepted answer
  1. ZoeHui-MSFT 41,491 Reputation points
    2021-04-13T01:40:45.837+00:00

    Hi @Learner DAX ,

    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


0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.