Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I am trying to reference an Expression within SET ANALYSIS, but I am having some difficulties.
I have an expressions as follows:
SET IRRAdverseCase =
IF(Region = 'Canada Region',
'Scenario I',
IF(Region = 'US Region',
'Scenario I',
'Scenario II')) ;
I then have an equation, which references the previous expression:
SUM(
{<
Scenario = {'$(IRRAdverseCase)'}
>}
[ParCr])
When I try to evaluate the expression, it comes up as zero (0). However, if I hard code the Scenario as follows, it produces the correct result:
SUM(
{<
Scenario = {'Scenario I'}
>}
[ParCr])
I am wondering if anyone knows why this is happening. I would appreciate some help with referencing the Scenario, as opposed to hard coding it because it could change.
May be try this
=SUM(
{<
Scenario = {'$(=$(IRRAdverseCase))'}
>}
[ParCr])
When US Region or Canada Region is selected
When Asia Region is selected
What if you try like this (Without single quotes around your variable)
SUM(
{<
Scenario = {$(IRRAdverseCase)}
>}
[ParCr])
Hello, Michael!
Try
SUM(
{<
Scenario = {"$(IRRAdverseCase)"}
>}
[ParCr])
You already define variable in Single Quote, So you don't require Single Quote over Set analysis for that variable
Hi, thanks for the response, but I had tried changing the quotes to "", but it still came up as zero (0)
Unfortunately I tried this approach, and it the output of the expression was still zero (0). So single quotes, double quotes and no quotes all produce zero (0).
Actually it worked for me with the single quotes
Well, actually my expression for 'IRRAdverseCase' is actually a series of equations, so it is not just hard-coded -- guessing that might be what is causing the issue.
Then why don't you post the "real" expression for IRRAdverseCase. Maybe we can still help you figuring out how to get this into shape?
What do you see in variable overview after the script runs through?