Skip to Main Content

Analytics Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to add a variance into a pivot table

Adam WickesOct 19 2017 — edited Oct 19 2017

Hi all,

I've seen the "variance in a pivot" question asked around here a fair bit and and happy that this is fairly easy using a calculated item.
My issue seems a little more complex though.

Basically, i'm trying to create the following in a pivot. 

Debit/CreditDebitDebitDebitCreditCreditCreditVariance
ProductP1P2P3P1P2P3Variance
BranchRegionNameAmountAmountAmountAmountAmountAmountAmount
11111TestBranch30555032033
22222TestBranch21020301510-34

I can't seem to work out how to get the variance column to be the total debits subtract the total credits but only have the single column at the end.
I've tried adding a union with a "variance" value in the debit/credit and product columns but it seems to act strangely.
I was hoping there would be an easier way that I wasn't aware of.


Thanks in advance,
Adam

This post has been answered by user11440683 on Oct 19 2017
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details