Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Dear experts,
I am trying to get a % value out of an expression, however I do believe there is some faults with my coding. Below I will provide the expression as well as the logic I am trying to achieve.
the requirements: (revenue from previous year / revenue this year) - 1
Formula/Script:
(Sum({<BDF_Type = {"Revenue"}, [year] = {"$(=Max([year])-1"}>} cash) / Sum({<BDF_Type = {"Revenue"}, [year] = {"$(=Max([year])"}>} cash) ) -1
The individual components of expression work, however when put together to acquire the ratio, they seem to be calculating the wrong values. Cheers !
Hi,
In your denominator expression you have written same expression as numerator that why you are getting 100 % Check again
Below expression are you looking for
=num(Sum({<BDF_Type = {"Revenue"}, [year] = {"$(=Max([year])-1)"}>} cash)/Sum({<BDF_Type = {"Revenue"}, [year] = {"$(=Max([year]))"}>} cash), '###.00%')
Regards,
dreamer4 has correctly pointed out the issue, isn't it?
Once I changed to Max(Year) in the set analysis for denominator, it seems to be all working?