Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

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"?

OrganizationAAABBB
ProcessFunctionCostPerc of ProcessPerc of TotalCostPerc of ProcessPerc of Total
Process1Function1$100.00=100/32000.92%$200.00=200/77001.83%
Process1Function2$100.00-0.92%$200.00-1.83%
Process1Function3$100.00-0.92%$200.00-1.83%
Process1Function4$200.00-1.83%$400.00-3.67%
Process1Function5$200.00-1.83%$400.00-3.67%
Process1Function6$100.00-0.92%$200.00-1.83%
Process1Function7$100.00-0.92%$200.00-1.83%
Process1Function8$100.00-0.92%$200.00-1.83%
Process1Total$1,000.00-9.17%$2,000.00-18.35%
Process2Function9$300.00-2.75%$900.00-8.26%
Process2Function10$200.00-1.83%$600.00-5.50%
Process2Function11$100.00-0.92%$300.00-2.75%
Process2Function12$100.00-0.92%$300.00-2.75%
Process2Function13$300.00-2.75%$900.00-8.26%
Process2Function14$200.00-1.83%$600.00-5.50%
Process2Function15$100.00-0.92%$300.00-2.75%
Process2Total$1,300.00-11.93%$3,900.00-35.78%
Process3Function16$100.00-0.92%$200.00-1.83%
Process3Function17$200.00-1.83%$400.00-3.67%
Process3Function18$200.00-1.83%$400.00-3.67%
Process3Function19$100.00-0.92%$200.00-1.83%
Process3Function20$100.00-0.92%$200.00-1.83%
Process3Function21$100.00-0.92%$200.00-1.83%
Process3Function22$100.00-0.92%$200.00-1.83%
Process3Total$900.00-8.26%$1,800.00-16.51%
Total$3,200.00-29.36%$7,700.00-70.64%


Thanks for any help!

1 Solution

Accepted Solutions
Not applicable
Author

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.

View solution in original post

3 Replies
Not applicable
Author

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.

Not applicable
Author

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.

Not applicable
Author

hi all,

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

Thank you in advance