Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I hope you can help me with these.
I have a pivot table with the following: Company/Brand/Price.
Price calculated from Sales/units
I want to take one of those prices and show the relative price to it, like shown in the next table (i take Brand 1 as the value i want to make relative prices to)
| Company | Brand | Price | Relative Price |
| Company 1 | Brand 1 | 5,3 | 100% |
| Company 1 | Brand 2 | 4 | 75% |
| Company 2 | Brand 3 | 3 | 57% |
| Company 2 | Brand 4 | 6 | 113% |
| Company 2 | Brand 5 | 2 | 38% |
| Company 2 | Brand 6 | 5 | 94% |
| Company 3 | Brand 7 | 1 | 19% |
| Company 3 | Brand 8 | 7 | 132% |
| Company 3 | Brand 9 | 3 | 57% |
When i try to do it in Qlikview with the next expression, it only shows the first brand, nothing else.
(Sum({$<VARIABLES>} SALES)/Sum({$<VARIABLES>} UNIT)) / (Sum({$<VARIABLES, BRAND 1>} SALES)/Sum({$<VARIABLES,BRAND 1>} UNIT)).
Please help.
thanks
Create a variable vIndexPrice as =sum({<BRAND={'Brand 1'}>} SALES)/sum({<BRAND={'Brand 1'}>} UNITS).
Then use the variable in the expression: (sum(SALES)/sum(UNITS)) / $(vIndexPrice)
Replace SALES, UNITS and BRAND with the correct field names of your document.
I've tried both, but it is always the same. In my table only appears Brand 1.
I still have problems trying to fix this. Does anyone have a clue?