
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
finding percentage % difference between 2 sums
Hi
I need to find the % different between 2 sums, i have tried a few things but never get the calculated result below.
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
Accepted Solutions

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
may be try this
=(sum({<[Year]={'2019'}>} [HKD_Price]) - sum({<[Year]={'2018'}>} [HKD_Price]) )/sum({<[Year]={'2018'}>} [HKD_Price])
or
(1- sum({<[Year]={'2019'}>} [HKD_Price]) / sum({<[Year]={'2018'}>} [HKD_Price]))*-1

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
58.8978% is correct ?
and only from
2760530389.02
1504520710.05
?
Taoufiq ZARRA
"Please LIKE posts and "Accept as Solution" if the provided solution is helpful "
(you can mark up to 3 "solutions") 😉

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
may be try this
=(sum({<[Year]={'2019'}>} [HKD_Price]) - sum({<[Year]={'2018'}>} [HKD_Price]) )/sum({<[Year]={'2018'}>} [HKD_Price])
or
(1- sum({<[Year]={'2019'}>} [HKD_Price]) / sum({<[Year]={'2018'}>} [HKD_Price]))*-1

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
The figure is correct when i work outside of QV but i cannot make an expression to obtain the correct Value, thank you for the reply, if you have the solution please help.
Thank you in advance
Daniel

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Looking at the values we won't be able to know what is the logic to get the %. A general % difference formula is already suggested. Please provide some sample data with logic to calculate % difference

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
HI,
Thank you for this, not sure i worded right but once i made the figures smaller this made sense.
Thank you

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dear Kush,
Could you please correct me if i'm wrong.
But is there are any other option to calculate it?
My aggregation still incorrect.
Formula:
NUM(
(
(
sum({<[line_sku] = {$(=chr(34) & concat(distinct [temp_all_FF_struc.line], chr(34)&','&chr(34)) & chr(34))},d_type = {'target'}, yr_q = {'$(vYr)_$(vQ)'}>}pcs * $(vPLGF))
-
sum({<[line_sku] = {$(=chr(34) & concat(distinct [temp_all_FF_struc.line], chr(34)&','&chr(34)) & chr(34))},d_type = {'fact'}, yr_q = {'$(vYr_p)_$(vQ)'}>}pcs * $(vPLGF))
)
/ sum({<[line_sku] = {$(=chr(34) & concat(distinct [temp_all_FF_struc.line], chr(34)&','&chr(34)) & chr(34))},d_type = {'target'}, yr_q = {'$(vYr)_$(vQ)'}>}pcs * $(vPLGF))
)
, '#0%')
Thank you in advance!
