Share via

Future Date

Kimmie25 121 Reputation points
2021-01-07T13:53:56.207+00:00

Hi,
I'm trying to calculate a future date but my expression is not working.
Could someone please help?
=IIF(Fields!PDate.Value > Fields!ADATE.Value AND Fields!CodeText.Value ="MIKE",Fields!ADATE.Value +18,
IIF(Fields!PDate.Value > Fields!ADATE.Value AND Fields!CodeText.Value ="PAUL",Fields!ADATE.Value +35))

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.

0 comments No comments

Answer accepted by question author

Kimmie25 121 Reputation points
2021-01-15T11:28:32.707+00:00

Thank You for your help. I figured it out.

Was this answer helpful?

1 person found this answer helpful.
0 comments No comments

2 additional answers

Sort by: Most helpful
  1. Joyzhao-MSFT 15,651 Reputation points
    2021-01-15T09:19:52.4+00:00

    Hi @Kimmie25
    Has your issue been resolved?
    If you have any question, please feel free to let me know.
    If the answer is helpful, please click "Accept Answer" and upvote it.
    Best Regards,
    Joy


    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.

    Was this answer helpful?

    1 person found this answer helpful.
    0 comments No comments

  2. Joyzhao-MSFT 15,651 Reputation points
    2021-01-08T02:45:32.667+00:00

    Hi @Kimmie25 ,
    I think we should distinguish between IIF function and SWITCH function here.

    IIf (expr, truepart, falsepart)  
    

    expr:Required. Expression you want to evaluate.
    truepart:Required. Value or expression returned if expr is True.
    falsepart:Required. Value or expression returned if expr is False.

    SWITCH(expression, value1, result1, [default or value2, result2],…[default or value3, result3])  
    

    Obviously, SWITCH is more appropriate here.
    For more expression examples, please refer to: Expression Examples (Report Builder and SSRS)
    If you could provide more detailed test data and report structure, I can help you test locally.
    Regards,
    Joy


    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.

    Was this answer helpful?

    1 person found this answer helpful.

Your answer

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