cancel
Showing results for 
Search instead for 
Did you mean: 

How do I create a variable that uses Previous() and references itself.

Former Member
0 Kudos

I am trying to create a crosstab with a number of meaures in it. I have a variable called opening stock and another called closing stock. The opening stock for day 2 is the closing stock for day 1 and is a variable [LV Opening Stock] defined as =Previous([closing stock];Row). This works fine. But, the closing stock for day 2 is the opening stock plus production minus sales. So my variable has to reference the previous days closing stock.

When it is defined as =[LV Opening Stock]+[Planned Production Qty]-[Forecast Daily Qty] it validates but when I try to save it I get the following message : The formula for variable [LV Opening Stock] contains a reference to a variable with the same short name. You must use the fully-qualified variable name in the formula to remove this ambiguity. (Error: WIS 10040)

How do I solve this? What is the fully-qualified name? Is it because it's effectively referencing itself?

I'm using XI R2 sp4

Thanks

John

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi, Appreciate if anyone has a solution to this, I am facing the same issue.

Thanks.

Former Member
0 Kudos

Hi,

What happens is that the variabla is referência itself be through a direct referente ( like [a]=[a]+2) or indirectly, like in the original case, it referentes a variable that references itseif, creating a recurrence.

The only possible way of recurrence in WEBI , is through the Self operator with Previous function.Can you share what's the fórmula givimg the error?

Regards,

Rogerio

vijaymuniraj
Active Participant
0 Kudos

Hello,

Try to use relative date function instead of using prevous function. Previous function only consider the previous value from crosstable (not by date). I'm not sure for the solution but you can give a try.

Former Member
0 Kudos

Hello! Did anyone find a solution for this? I would really appreciate if you can help me.

Former Member
0 Kudos

Did you find a solution for this?

Former Member
0 Kudos

Probably, or another way of doing it bu can't remember - it was 5 years ago !!

Former Member
0 Kudos

Please do share with me if you remember.

Former Member
0 Kudos

Hi. I'm having the same issue. Please share with us if you find a solution.

Many thanks.

Former Member
0 Kudos

Any luck finding a solution? Would love to see it!

Thanks