I have already tried Normal Cross tab, tried multiple DPs and all the stuffs that I could thing of.
Let me know if its achievable in BO.
THANKING YOU in advance for your replies!
[Edited, applied the code option for formatting. It will preserve any indenting or formatting that you may have done, so your crosstab will display properly. Thank you, Andreas.]
One thing I understand is, it does not seem to be possible.
Another thing, I would like to explain that how does it make sense to me.
Mt desired format clearly shows the below analysis
Total Rev for “ABC” group is “225”
Total Rev for “ABC” and “TTT” combination is “100”
Total Rev for “ABC” and “ZZZ” combination is “75” and so on for left two row headers.
I understand, there is some repetition of the information but this is what my user has requested me to generate a report in this format.
Let me know if you or anybody else can think of anyway to achieve this except asking/suggesting user to get the data in different format.
The solution for your problem is to employ the use of the cross join feature in the SQL language. I’ve used SQL for the past 16 years and yours is only the second case I’ve ever advised on using the cross join (making multiplication tables in sql doesn’t count, right?) Anyhow, here is a short SQL script for building your table and then pulling the data down (SQL script below is just a refresher for you so that you can see the method to my madness)
create table Gaurav13 (id1 int,group1 char(3),rev int)
insert into Gaurav13 values (123,‘ABC’,100 )
insert into Gaurav13 values (123,‘TTT’,100 )
insert into Gaurav13 values (234,‘ABC’,50 )
insert into Gaurav13 values (567,‘ZZZ’,75 )
insert into Gaurav13 values (567,‘ABC’,75 )
select Gaurav13_1.group1,Gaurav13_2.group1,sum(Gaurav13_1.rev),sum(Gaurav13_2.rev)
from Gaurav13 Gaurav13_1 join Gaurav13 Gaurav13_2 on Gaurav13_1.group1=Gaurav13_2.group1
group by Gaurav13_1.group1,Gaurav13_2.group1
order by 1,2
I am uploading an excel spreadsheet that uses pivot table feature which is the same functionality as cross-tab in webI, so that you can see the product from the above SQL data pull and the output.
Good luck with this and post back if you have any questions/clarifications.
Thanks so much for your time; I just had a look in to file you sent but It is not getting us the desired result.
If you seem, we are getting only numbers for ABC-ABC, TTT-TTT and ZZZ-ZZZ combinations.
I also need to display numbers for each and every possible combinations like ABC-TTT, ABC-ZZZ, TTT-ABC, TTT-ZZZ, ZZZ-ABC and ZZZ-TTT.
In other words, none of B5 to D7 cells should be blank in “sheet2” of attached file.
Feel free to let me know if you have any doubt(s) on this.
I am providing solution based on Johns data, your last posting was very clear…ok here it is
create table Gaurav13 (id1 int,group1 char(3),rev int)
insert into Gaurav13 values (123,‘ABC’,100 )
insert into Gaurav13 values (123,‘TTT’,100 )
insert into Gaurav13 values (234,‘ABC’,50 )
insert into Gaurav13 values (567,‘ZZZ’,75 )
insert into Gaurav13 values (567,‘ABC’,75 )
select group1, group2, rev2 from
(select id1, group1, sum(rev) rev1 from Gaurav13
group by id1,group1 ) a,
(select id1,group1 group2 , sum(rev) rev2 from Gaurav13
group by id1,group1 ) b
where a.id1=b.id1
create cross tab based on the above sql. (see attached output)