Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
How can one use the totals from the pivot table on one of the raws to get a ratio of a different raw on the same table?. I can not use the static total that is there because it will change maybe even on a daily bases so I may need some code or something else.
Hi.
Just use 'total' statement in the same expression.
For example:
=Sum(sales)/Sum(total sales)
The second sum discards all dimensions and return grand total. If you need a partial total you can use total<Dim1, Dim2> to keep some dimensions.
I have tried that one but doesnt return the correct ratios. The ratio is suppose to be the (expression/total) * 100
Is there no other way of doing this? Thanks for your response though....
What is the problem with ratios, that they doesn't multiplied by 100 or something else ?
Coule you provide your expression ?
This is the expression for the above value
SUM(IF(vStatus = 'CXD',[CANCELLED],
REINSTATED))
And the expression for the Ratio calculation looks like this
SUM(IF(vStatus = 'CXD',[CANCELLED],REINSTATED))
/
SUM(TOTAL(IF(vStatus = 'CXD',[CANCELLED],
REINSTATED)))
The answers from the ratio expression are not the correct answers. Myltiplying by a 100 is not necessary as I have already ticked the percentage option on qlikview.
I think you can't do it that way.
Try:
=Rangesum(Sum({<vStatus = {'CXD'}>} [CANCELLED]),Sum({<vStatus -= {'CXD'}>} [REINSTATED]))
/ Rangesum(Sum({<vStatus = {'CXD'}>} total [CANCELLED]),Sum({<vStatus -= {'CXD'}>} total [REINSTATED]))