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,
Try now:
(Sum({<BDF_Type = {"Revenue"}, [year] = {"$(=Max([year])-1)"}>} cash)/Sum({<BDF_Type = {"Revenue"}, [year] = {"$(=Max([year]))"}>} cash)) - 1
But I wonder how this was working individually.... was this a typo?
yes it was a typo when i posted the question sorry !
I don't see anything wrong in your expression, would you be able to share a sample to look at?
the calculated value will be over 80% if done individually
you don't have year set analysis in the denominator, could that be the issue?
sorry when I changed the denominator to Sum({<BDF_Type = {"Revenue"}, [year] = {"$(=Max([year])"}>} cash) instead of using the one shown in the picture i get 100% which is weird
Unless you can share your application, I would really know
Preparing examples for Upload - Reduction and Data Scrambling
Heya Sunny,
This is the file as per requested! sorry I took so long to get back to you, had some trouble with my computer. Is it possible to view the files once you have done the edit as I am using the free personal version at the moment!
Kind regards,
Royce Tang