COGNOiSe.com - The IBM Cognos Community

Legacy Business Intelligence => COGNOS ReportNet => Report Studio => Topic started by: Bern on 07 May 2009 11:27:16 AM

Title: Mix of two measures.
Post by: Bern on 07 May 2009 11:27:16 AM
Hi everybody,

I've got a problem with a report because I couldn't do what I want.

My objective is to mix two measures (each one with a specific filter) in the same Crosstab, it's like to do two Query's and print them in the same Crosstab.
Is there any possibility to do this? ???

I've tried to do this with te Report Studio, with the Framework Manager, duplicating the Model Query Subject in FM, etc.

I don't know if it's impossible or there something that I've forgotten.

Thanks far all!

Title: Re: Mix of two measures.
Post by: david.stachon on 08 May 2009 12:39:43 AM
likely, you will need two sub queries (one for each measure), then a UNION to produce the query that your cross-tab will use.
Title: Re: Mix of two measures.
Post by: Bern on 08 May 2009 02:31:38 AM
Quote from: david.stachon on 08 May 2009 12:39:43 AM
likely, you will need two sub queries (one for each measure), then a UNION to produce the query that your cross-tab will use.

OK, I'll try with the UNION.
Thanks!
Title: Re: Mix of two measures.
Post by: Bern on 08 May 2009 03:29:53 AM
Quote from: david.stachon on 08 May 2009 12:39:43 AM
likely, you will need two sub queries (one for each measure), then a UNION to produce the query that your cross-tab will use.

Hello david.stachon,

I've tried with the UNION, but I can't select the objects of the second Query.
Title: Re: Mix of two measures.
Post by: vij on 08 May 2009 07:42:00 AM
HI  Bern ,
normally we Create a union query to combine two or more queries into one result set.

To combine two queries, the following conditions must be met:

The two queries must have the same number of data items.

The data types of the data items must be compatible and the data items must appear in the same order.

Date data types must match perfectly.



hope it might hepls you

regards,
vij  :)


Title: Re: Mix of two measures.
Post by: angela on 20 May 2009 01:18:24 PM
It's possible you want a JOIN instead of a UNION.  Join on the dimensions and you can get both measures in the resulting query.
Title: Re: Mix of two measures.
Post by: david.stachon on 20 May 2009 11:50:50 PM
...same effect.
Title: Re: Mix of two measures.
Post by: angela on 22 May 2009 01:27:24 PM
Same effect meaning what?  If you do a join are you getting the first measure but blanks for the second?  Do you need a left join instead of an inner join?  Please describe the output you're seeing.
Title: Re: Mix of two measures.
Post by: david.stachon on 22 May 2009 11:57:40 PM
I'm not seeing any output. It's not my query, and not my problem. :-)

....but to clarify, if he has the same combination dimensions for both measures (and dimension values) a UNION would have same effect as a JOIN.