If you are unable to create a new account, please email support@bspsoftware.com

 

Cognos 10.2.2 Report Studio Filtering Model Results Date Column, changes result

Started by JEK, 31 Jul 2015 10:02:07 AM

Previous topic - Next topic

JEK

I have a Cognos model that analyzes contract hardware changes between revisions of that contract for a year period. The results of this model shows if the equipment is being deleted between revisions, or new addition to the contract. There is a regristration date assigned to these revisions. In Report Studio I want to filter on this regristration date to select the rows related to the date selected by user. This allows user to see what changed during the dates selected. MY PROBLEM is: filtering on the regristration date in Report Studio cause all my calculations in the model to be recalculated on the date user selects. I get a completly different results, because the new calculation does not take into acount the activity before the selected dates.
IS THERE a way to apply this date filter on just the report results of the model?

gpollock

The way you are describing this works as designed.  If you filter a query by a date range, all calculations from that query will only be on the data present i.e. what you filtered on.  From what you're describing, you want one set of data that is shown to the user, and one set of data that is used for the calculations.  Try using two queries: one for each.

To make things simpler, you can create a new query that just uses the items from your first query, and only applies the date filter to that second query.  Base your list off the second query, and the calculations on the first.

JEK

gpollock,, Thank you for the reply. I had tried what you suggested in Report Studio with no luck. Can't seem to figure out how to make query 2 independent of the model. Seems simple enough. Use query 1 results in query 2, but I have not had luck figuring out how. Is there any basic hint you can give to make this work? When I add a new query I just do not see a option to make query 1 the source.

gpollock

Hi JEK,

To create two queries independent of each other but based on the same model, simply copy and paste the data items.  If you want to have query 2 be query 1 but with a separate filter, you need to be on the query explorer screen, where you can drag and drop joins, unions, etc.  Drag a new query item over to create query 2.  Then, while still on that screen, drag query one to the right of query 2, until you see the blinking bar.  This will look similar to how it does in the page layout when adding a new item.  If you do it right, you will now see a shortcut of query 1 with an arrow pointing toward query 2.  You can now add items to query 2 using query 1 as a source.

As a reminder, always double-check your aggreate functions on your new data items.

JEK

Hi gpollock
Thank you, that was the hint I needed. The report date filter now works as I had hoped.. Dragging query 1 over to query 2 is the key I did not know about..
Again Thank you,, hope I can return the favor in the future.