COGNOiSe.com - The IBM Cognos Community

IBM Cognos Analytics Platform => Cognos Analytics => Reporting => Topic started by: ArnaudStephanHTH on 15 Jan 2020 10:02:01 AM

Title: Several measurements in single Crosstab
Post by: ArnaudStephanHTH on 15 Jan 2020 10:02:01 AM
Hello everyone,

I have a list of measurements in a data source :

(https://i.imgur.com/4X8ezyh.png)

And I would like to show them in a crosstab, having one line by type of measurement. As you can see, all measurements are duplicated. There is MEASUREMENT and MEASUREMENT_IMRP.

The hierarchy of the crosstab would be like that :

                                           Lib Long Division
                              Centre de Coût     |        Centre de Coût
                             Normal | Impr      ||       Normal | Impr
Measurement 1
Measurement 2
Measurement 3

And the result would look like that :

(https://i.imgur.com/5c5hlL7.png)


The problem is that if I try to put several measurements in the crosstab I get one column per measurement, and I can't put them line by line.

(https://i.imgur.com/NAhTOux.png)

And if I drag the measurements to the lines, then I lose the Normal/Impr distinction in the columns that I want :

(https://i.imgur.com/YodyfLh.png)

I have seen reports (that I don't have access to anymore) where it had been made possible, so I'm sure there is a way of doing that. Any leads ?
Title: Re: Several measurements in single Crosstab
Post by: ArnaudStephanHTH on 15 Jan 2020 10:31:05 AM
I found a way !

The data was coming from a JOIN, to get columns with the normal measurements and columns with the IMPR measurements. Instead of a join I used an union, and added a data item to track the source of each line.