3 Replies Latest reply: Jul 13, 2011 6:18 AM by nbazugar

# Pivot Percentages Calculation

Hi,

Just started using Qlikview and can't figure this out. I've tried looking at other posts as well.

I'm trying to calculate percentage of costs. I have 3 dimensions: Process, Function and Org.

I am calculating three things.

• Cost: Sum (COST)
• Percentage of Total: Sum (COST) / Sum (Total (COST))
• Percentage of Process: ????????

I can't figure out how to write this expression. I've tried total <dimensions> but I can't get it to work. Also is "Total" the right use or "All"?

 Organization A A A B B B Process Function Cost Perc of Process Perc of Total Cost Perc of Process Perc of Total Process1 Function1 \$100.00 =100/3200 0.92% \$200.00 =200/7700 1.83% Process1 Function2 \$100.00 - 0.92% \$200.00 - 1.83% Process1 Function3 \$100.00 - 0.92% \$200.00 - 1.83% Process1 Function4 \$200.00 - 1.83% \$400.00 - 3.67% Process1 Function5 \$200.00 - 1.83% \$400.00 - 3.67% Process1 Function6 \$100.00 - 0.92% \$200.00 - 1.83% Process1 Function7 \$100.00 - 0.92% \$200.00 - 1.83% Process1 Function8 \$100.00 - 0.92% \$200.00 - 1.83% Process1 Total \$1,000.00 - 9.17% \$2,000.00 - 18.35% Process2 Function9 \$300.00 - 2.75% \$900.00 - 8.26% Process2 Function10 \$200.00 - 1.83% \$600.00 - 5.50% Process2 Function11 \$100.00 - 0.92% \$300.00 - 2.75% Process2 Function12 \$100.00 - 0.92% \$300.00 - 2.75% Process2 Function13 \$300.00 - 2.75% \$900.00 - 8.26% Process2 Function14 \$200.00 - 1.83% \$600.00 - 5.50% Process2 Function15 \$100.00 - 0.92% \$300.00 - 2.75% Process2 Total \$1,300.00 - 11.93% \$3,900.00 - 35.78% Process3 Function16 \$100.00 - 0.92% \$200.00 - 1.83% Process3 Function17 \$200.00 - 1.83% \$400.00 - 3.67% Process3 Function18 \$200.00 - 1.83% \$400.00 - 3.67% Process3 Function19 \$100.00 - 0.92% \$200.00 - 1.83% Process3 Function20 \$100.00 - 0.92% \$200.00 - 1.83% Process3 Function21 \$100.00 - 0.92% \$200.00 - 1.83% Process3 Function22 \$100.00 - 0.92% \$200.00 - 1.83% Process3 Total \$900.00 - 8.26% \$1,800.00 - 16.51% Total \$3,200.00 - 29.36% \$7,700.00 - 70.64%

Thanks for any help!

• ###### Pivot Percentages Calculation

I think you are on the right track. If you want 100/3200 that would be the TOTAL ignoring all dimensions except the Org. Is that correct? I believe the syntax for that would be:

`Sum(COST)/Sum(TOTAL <Organization> COST)`

Did you try that already? One thing you could do is just try getting the denominator, so:

`Sum(TOTAL <Organization> COST)`
That should give you 3200 on all of the A lines.

EDIT: I attached a sample.

• ###### Pivot Percentages Calculation

Thanks for the reply. I've got it working now.

I was having trouble with the dimension name because it was a two word dimension and I needed some quotes. Thanks for putting together the examples.

• ###### Pivot Percentages Calculation

hi all,

i hope your case help me , in my case i would like to have =100/1000  ( group by process ) , how to do ??