COGNOiSe.com - The IBM Cognos Community

IBM Cognos Analytics Platform => Cognos Analytics => Reporting => Topic started by: Cognos_Jan2017 on 26 Jun 2017 02:27:31 PM

Title: CrossTab Trying to Display Calculation
Post by: Cognos_Jan2017 on 26 Jun 2017 02:27:31 PM
Is driving me bonkers.

Whenever two calculations are dragged in w/ measures, the two calculations WON'T display separately.

IE, a calculation of ...
Case
When [Fiscal Year]= 2017 and [Level 1 Name]='AAA' Then 1.31
When [Fiscal Year]= 2017 and [Level 1 Name]='BBB' Then 0.23
When [Fiscal Year]= 2017 and [Level 1 Name]='CCC' Then 1.17

When [Fiscal Year]= 2016 and [Level 1 Name]='AAA' Then 1.81
When [Fiscal Year]= 2016 and [Level 1 Name]='BBB' Then 0.38
When [Fiscal Year]= 2016 and [Level 1 Name]='CCC' Then 1.20
End

''' winds up crreating 3 Columns (under FY 2017)
as 1.31, 0.23, and 1.17

''' winds up creating 3 Columns (under FY 2016)
as 1.81, 0.38, and 1.20

The second calculation 'DDD' displays its value in its own 'DDD'
Column PLUS in the appropriate 'AAA', 'BBB', or 'CCC' column.

How can this be corrected?

TIA, Bob
Title: Re: CrossTab Trying to Display Calculation
Post by: Cognos_Jan2017 on 26 Jun 2017 05:11:41 PM
Creation of 3 Columns my FAULT ... used a Data Item instead of Query Calculation.  Sorry.
Title: Re: CrossTab Trying to Display Calculation
Post by: Cognos_Jan2017 on 27 Jun 2017 10:32:48 AM
Quote
Creation of 3 Columns my FAULT ... used a Data Item instead of Query Calculation.  Sorry.

My error again.  Obviously I am missing something in Crosstabs.  It does appear the best way to drag
multiple Data Items into a Crosstab is to have those Data Items next to each other (selected by <Shift>)
then dragging them in.

My earlier Post ...
QuoteIs driving me bonkers.

Whenever two calculations are dragged in w/ measures, the two calculations WON'T display separately.

IE, a calculation of ...
Case
When [Fiscal Year]= 2017 and [Level 1 Name]='AAA' Then 1.31
When [Fiscal Year]= 2017 and [Level 1 Name]='BBB' Then 0.23
When [Fiscal Year]= 2017 and [Level 1 Name]='CCC' Then 1.17

When [Fiscal Year]= 2016 and [Level 1 Name]='AAA' Then 1.81
When [Fiscal Year]= 2016 and [Level 1 Name]='BBB' Then 0.38
When [Fiscal Year]= 2016 and [Level 1 Name]='CCC' Then 1.20
End

''' winds up crreating 3 Columns (under FY 2017)
as 1.31, 0.23, and 1.17

''' winds up creating 3 Columns (under FY 2016)
as 1.81, 0.38, and 1.20

The second calculation 'DDD' displays its value in its own 'DDD'
Column PLUS in the appropriate 'AAA', 'BBB', or 'CCC' column.

How can this be corrected?

Doing that creates 3 new Columns, with results (for Fiscal Year 2017), such as ...
                          ----------- Crosstab -----------------------------
                          NewColumn1     NewColumn2     NewColumn3
                               1.31                  0.23                 1.17
AAA                         0.98                  0.00                 0.00  <------ The 0.98 is a calculation for AAA only               
BBB                         0.00                  0.46                 0.00  <------ The 0.46 is a calculation for BBB only
CCC                         0.00                  0.00                 1.17  <------ The 1.17 is a calculation for CCC only

How can I use a Query Calculation (called a Data Item) to have ONE Column w/ its name of 'Target"
and then see ...
          --- Crosstab ---
          Target
AAA      1.31               
BBB      0.23
CCC      1.17

Please ask me any questions so I can learn this.  I sure wish there was a Source "Book"
that explained all the Nuts & Bolds of Crosstabs.

TIA, Bob