crosstabcognosmeasures

Cognos 10 multi fact crosstab


I am making a cross tab that displays how many people of certain race and ethnic origin signed up for a program by county So the rows are a list of each county and the columns are the races sub divided by ethnicity.

---------------|-----Race1-----|-----Race2-----|-----Race3-----|      
---------------|EO1----|EO2----|EO1----|EO2----|EO1----|EO2----|      
---------------|--------------------------------------------------------
COUNTY1        |  
COUNTY2        |  
COUNTY3        |

The measure I'm using is a count of each person unique id which populates the crosstab correctly.
The problem Im having is that now I want to add a few more columns at the end of this that shows a percentage total of each race (How many African Americans signed up out of the total number of people, how many Caucasians signed up out of the total number of people, etc)

But adding that measure changes the rest of them, so is it possible to add these measures without changing the count? I'm fairly new to cognos so a thorough explanation would be greatly appreciated.

thank you.


Solution

  • Multi-measures in a crosstab are a bit tricky. You have to override the default behavior of the crosstab which is to only have one measure. In the case of horizontal summary columns, you can accomplish this by doing the following:

    1. Create a new data item in the query that contains your custom calculation (e.g. total()/count() for average)
    2. Add a 'Crosstab Space (with fact cells)' object to the right side of your crosstab
    3. Select the new fact columns. They should display <#1234> in design view.
    4. Set the 'Define Contents' property to 'Yes'. The default values should disappear.
    5. Unlock the report (lock button in the toolbar or Structure>Lock Page Objects from the menu bar)
    6. Drag the data item created in step 1 into the new right-hand summary cells.
    7. Be sure to re-lock the report when done adding summary values

    You can do this any number of times for additional custom fact columns.