I have a set of values for two different dates in my OBIEE report:
------------------------------------------------------------------
Option Date Value
------|---------|-------
OPT1 Date 1 5
OPT1 Date 2 2
OPT2 Date 1 9
OPT2 Date 2 1
OPT3 Date 1 7
OPT3 Date 2 13
OPT4 Date 1 5
OPT4 Date 2 6
I hope to get the difference of Values between each set of date, and present the data in the following format, grouped by option:
Option Date Diff
Date 1 Date 2
------|--------|--------|-------
OPT1 5 2 3
OPT2 9 1 8
OPT3 7 13 -6
OPT4 5 6 -1
The Date portion can be handled using Pivot, however I am unable to find the difference between the now pivoted columns.
I believe if the difference between the two values be found for a set of date (as shown below) and then pivoted, it might do the trick but i can't find the difference for a set.
Option Date Value Diff
-------|---------|-------|-------
OPT1 Date 1 5 null
OPT1 Date 2 2 3
OPT2 Date 1 9 null
OPT2 Date 2 1 8
OPT3 Date 1 7 null
OPT3 Date 2 13 -6
OPT4 Date 1 5 null
OPT4 Date 2 6 -1
Any help is appreciated.
Thanks, Junaid