Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have the following two variables with the values tested in text boxes:
I am trying to get the % change from current versus the previous as follows:
=$(vSetCurrentAvRevRx)/$(vSetPreviousAvRevRx) - 1 and formatted as a percentage in number tab option
which should give -1.56% but i am getting a different value (-.99999). My expression above should be the problem. Kindly assist.
Regards
Message was edited by: Christopher Chitemerere
Chirstopher, Add equal sign like below.
=($(=vSetCurrentAvRevRx)/$(=vSetPreviousAvRevRx) )- 1
Or you can prefix equal sign (=) before num syntax in your both current and previous expressions and try below
=($(vSetCurrentAvRevRx)/$(vSetPreviousAvRevRx) )- 1
are your sure that your variables are correct.
Test them in case of
Hi Christopher
here a qvw
best regards
chrisitan
Thanks Tamil, i get an error: Error in expression
The values returned by the variables are give in the textboxes posted in my initial post.
Many thanks, you are on the right track you missed the -1 and should be as follows:
Num(
((Sum({$<$(vSetMTD)>}[MedAid Amount]) +Sum({$<$(vSetMTD)>}[Shortfall]))/Sum({$<$(vSetMTD)>}Rx))
/
((Sum({$<$(vSetPreviousMonth)>}[MedAid Amount]) + Sum({$<$(vSetPreviousMonth)>}[Shortfall]))/Sum({$<$(vSetPreviousMonth)>}Rx)) - 1,
'# ##0,00 %')
This give the correct value as posted in my initial post. I am however looking as using the variables.
Ok.Did you try the second solution. Go to variable window and add equal sign in your expressions like below
Current
=Num((Sum({$<$(vSetMTD)>}[MedAid Amount])) + Num(Sum({$<$(vSetMTD)>}[Shortfall])), '$##,##0.00')/Num(Sum({$<$(vSetMTD)>}Rx), '#,##0')
Previous
=Num((Sum({$<$(vSetPreviousMonth)>}[MedAid Amount])) + Num(Sum({$<$(vSetPreviousMonth)>}[Shortfall])), '$##,##0.00')/Num(Sum({$<$(vSetPreviousMonth)>}Rx), '#,##0')
And try
=($(vSetCurrentAvRevRx)/$(vSetPreviousAvRevRx) )- 1
Thank you Christian, i will look at the qvw
Regards.
Hi Tamil
Tried the second option above and gives a blank