Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Is it possible to reference a measure to construct another measure?
I created a measure to calculate the % change over time. Then, I would like to reference this new variable to create another measure needed for the range slider -
i.e.,
% change measure -
num(sum(RETAILTRADE_MSA)/below(sum(RETAILTRADE_MSA)) -1,'#.0%')
new measure for range slider - this is required for the range slider extension that I am using. It references the min/max values of the variable. However, I would like to reference the % change measure.
Sum({$<RETAILTRADE_MSA ={">=$(=vMin_RETAILJOB) <=$(=vMax_RETAILJOB)"}>} RETAILTRADE_MSA)
It is not working well, but not sure if it's the extension that is not working or if it's not working because it is not possible to reference another created measure.
Thank you,
Jessica
But the error message is telling me that it can't find
TOTPRIV_MSA_Delta
I think it's because this variable is created within the same load statement that it's being used in.
How about this?
EARNINGS_MSA_DELTA:
LOAD *,
[TOTPRIV_MSA] - Alt(Peek('TOTPRIV_MSA'), [TOTPRIV_MSA]) as TOTPRIV_MSA_Delta;
LOAD *,
num([TOTPRIV_MSA] - Alt(Peek('TOTPRIV_MSA'), [TOTPRIV_MSA]))/[TOTPRIV_MSA] as [TOTPRIV_MSA_%]
Resident EARNINGS_MSA
Order by DATE;
DROP Table EARNINGS_MSA;
The above should be fine, but then why not this:
EARNINGS_MSA_DELTA:
LOAD *,
([TOTPRIV_MSA] - Alt(Peek('TOTPRIV_MSA'), [TOTPRIV_MSA]))/[TOTPRIV_MSA] as [TOTPRIV_MSA_%],
[TOTPRIV_MSA] - Alt(Peek('TOTPRIV_MSA'), [TOTPRIV_MSA]) as TOTPRIV_MSA_Delta
Resident EARNINGS_MSA
Order by DATE;
DROP Table EARNINGS_MSA;
Still not working? Can you share your application if its not confidential?
Hi Sunny,
It worked, but the result is not the one I'm looking for. I can provide the file. Just give me one minute. Thank you!
No problem, take your time
How do I attach the file? I can't find that advanced reply link.
I am going to follow you so that you can we can talk on messages and I am more than happy to give you my email id so that you can shoot me an email with your file.
Great! Thank you.