COGNOiSe.com - The IBM Cognos Community

IBM Cognos Analytics Platform => Cognos Analytics => Reporting => Topic started by: DragonLady on 19 Apr 2017 09:34:04 AM

Title: 2 pages off 1 query with each page on its own filter
Post by: DragonLady on 19 Apr 2017 09:34:04 AM
Client has question about how to solve as simple in CA as they did in Business Objects.

They want to keep 1 query but report based on slightly different filters.  I can create a variable but want each page to have a different filter off that variable.

We're limited on system changes (groups, roles, packages).

Without system changes I'm hesitant to think report bursting with work.  Will conditional formatting work?  Other options?

Page 1
    A   B   C
X
Y
Z

Page 2
    B 
X
Y
Title: Re: 2 pages off 1 query with each page on its own filter
Post by: New_Guy on 19 May 2017 07:37:00 AM
Hi,
If you want to hide a column based on page you can create a render variable like 'PageName () <> 'Page2'' and assign it to the column you want to hide.

Good luck
New guy
Title: Re: 2 pages off 1 query with each page on its own filter
Post by: AnalyticsWithJay on 19 May 2017 08:43:18 AM
Quote from: DragonLady on 19 Apr 2017 09:34:04 AM
They want to keep 1 query but report based on slightly different filters.

I'm guessing this is for maintenance reasons?

1. Create your base query which contains your logic without any filters.
2. Create Query 1 and drag base query to the right of it to create a query reference. Add your filter.
3. Create Query 2 and drag base query to the right of it to create a query reference. Add your filter.

Page 1 will use Query 1, and Page 2 uses Query 2.

If you look at the SQL, base query is a subquery, and the parent query has the filter based on the subquery value.