Thank You for your help. I figured it out.
Future Date
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))
2 additional answers
Sort by: Most helpful
-
Joyzhao-MSFT 15,596 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. -
Joyzhao-MSFT 15,596 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.