Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi every body,
I'm working on a pivot table like this :
Level | Canal | Cost this year | Cost last year | Weignt |
RENAGEL | HP | 4865 | 5641,65 | 46.22% |
MT | 3506 | 5641,65 | 33.31% | |
GP | 2154 | 1927,8 | 20;46% | |
Total | 10525 | 1927,8 | 100% |
for facts columns i used this formulas :
Cost this year : set analysis over Cost column using a varibles which returns this year number :
=sum({<Level={'level1'},Year={$(=year_n)}>}cost)
Cost last year : same thing this the formula :
=sum({<Level={'level1'},Year={$(=year_n-1)}>}cost)
my question is what is the formula to calculate weight like in the table ?
exmple : 46.22%=(4865/10525)*100
THX
Use below expression
num(sum(Cost)/sum(total Cost), '#,##0%')
Hi,
Your [Weignt] column should have expression Num([Cost this year]/[Cost last year],'#,###.00%')
Regards,
Sokkorn
thanx for your answer but this will not work, i tried it before .
because i need to calculat sum(total cost) for this year.
see formulas above.
no it should have expression cost this year/total cost this year
Can u post ur qvw file?
it would be great.
(Salesthis year - Saleslast year) / Saleslast year * 100
100-(Cost last year/Cost last year%)
both will work
Hi,
Why don't to try like (Column(3)/Column(4))*100 in your expression weight?
here Column(3) is "Cost is this year" and Column(4) is "Cost last year".