COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Report Studio => Topic started by: vj040 on 02 Oct 2016 07:26:45 AM

Title: cross tab query
Post by: vj040 on 02 Oct 2016 07:26:45 AM
Hi Folks,
Greetings..Hope you all are doing good.
I am new to Cognos and want to do something like cross tab but didn't achieve what I want.

below is the table format (any no of rows with supplier, here I'm taking 4 rows):

supplier   tax          saving   warranty   payment                      category
supplier1   STX1   1000   1 yr           30 days after GRN       contract
supplier2   STX2   2000   2 yr           20 days after PO      individual
supplier3   STX1   1500   1.5 yr   30 days after GRN      Govt.
supplier4   VAT           3000   .6 yr           40 days after Invoice   contract


and I want to print this data in below format:

                  supplier1     supplier2     supplier3      supplier4
tax          STX1            STX2          STX1           VAT
saving         1000            2000           1500           3000
warranty      1 yr             2 yr             1.5 yr          0.6 yr
payment      30 days       20 days       30 days      40 days
                   after GRN     after PO      after GRN    after Invoice
category      contract       individual    Govt.          contract


Is it possible through crosstab? If not then how can I achieve this output please suggest.

Thanks.
Title: Re: cross tab query
Post by: Lynn on 03 Oct 2016 03:18:35 AM
Crosstabs are intended for measures that appear at the intersection of different dimensions on rows and columns. Other than "saving", all your other elements appear to be text.

There are techniques where you can use conditional logic to display text within a crosstab, but this is generally only feasible for a very small domain of possible values.

Have you looked into repeater tables?
Title: Re: cross tab query
Post by: Invisi on 03 Oct 2016 04:08:01 AM
This looks like a normal list, but then rows and colums are switched. Why do you want to do this? As Lynn points out, crosstabs are meant for quantitative data on the intersections between different category values.
Title: Re: cross tab query
Post by: vj040 on 04 Oct 2016 11:44:01 PM
Hi Lynn, Invisi

Thanks for your valuable response.

I'll check with repeater tables.

Is there any way to print data into 'N' number of columns ('N' can be any number and will be decided dynamically like in my case is the supplier, please note that if 4 suppliers than 4 columns, if 5 suppliers than 5 columns)

Thanks again.
Title: Re: cross tab query
Post by: vj040 on 08 Oct 2016 09:07:20 AM
Hi,

I checked with repeater table, but didn't achieve the desired output. Repeater table can control my number of columns but at the same time I want row wise data for tax, saving etc. for these Suppliers. How can I get data row wise for these fields?

Please advice.
Thanks
Title: Re: cross tab query
Post by: vj040 on 11 Oct 2016 10:37:41 PM
Please give your valuable suggestions.

Thanks