Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I have a requirement to find the difference between 2 figures realised by expression:
I have tried Expression 1 - Expression 2 / Expression 2 but this does not give the same value as when i perform the same with the figures.
Here is my effort:
num (Sum({<[Month-Year] = {"$(=Date(Max({<HKD_Price *= {[*]}>}[Month-Year]), 'MMM-YYYY'))"}>} HKD_Price) -
Sum({<[Month-Year] = {"$(=Date(Max({<HKD_Price *= {[*]}>}[Month-Year]-1), 'MMM-YYYY'))"}>} HKD_Price) /
Sum({<[Month-Year] = {"$(=Date(Max({<HKD_Price *= {[*]}>}[Month-Year]-1), 'MMM-YYYY'))"}>} HKD_Price)
, '#,##0%')
Any advise on how i would achive the percentage difference between 2 sums would be much appreciated.
Thank you in advance.
How about this
Num(
Sum({<[Month-Year] = {"$(=Date(Max({<HKD_Price *= {[*]}>}[Month-Year]), 'MMM-YYYY'))"}>} HKD_Price)
/
Sum({<[Month-Year] = {"$(=Date(Max({<HKD_Price *= {[*]}>}[Month-Year]-1), 'MMM-YYYY'))"}>} HKD_Price) - 1
, '#,##0%')
How about this
Num(
Sum({<[Month-Year] = {"$(=Date(Max({<HKD_Price *= {[*]}>}[Month-Year]), 'MMM-YYYY'))"}>} HKD_Price)
/
Sum({<[Month-Year] = {"$(=Date(Max({<HKD_Price *= {[*]}>}[Month-Year]-1), 'MMM-YYYY'))"}>} HKD_Price) - 1
, '#,##0%')
Thank you for the reply Sunny,
I will try to implement this shortly and follow up.
Much appreciated
Daniel
Thank you Sunny (Again),
Your assistance is so much appreciated.
Thank you
Daniel
Hi Sunny,
I have found an issue with results of the above.
I have decided to simplify things a little and need to find the % different between 2 sums
sum({<[Year]={'2019'}>} [HKD_Price])
and
sum({<[Year]={'2018'}>} [HKD_Price])
The figures are as follows and so know the difference must like below
2760530389.02
1504520710.05
58.8978% difference
Please can you assist in the expression to reach this result?
Thank you in advance
Daniel