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

 

News:

MetaManager - Administrative Tools for IBM Cognos
Pricing starting at $2,100
Download Now    Learn More

Main Menu

Trying to Write a Maximum (Most Recent Entry) for a Location

Started by Cognos_Jan2017, 29 Mar 2017 03:50:20 PM

Previous topic - Next topic

Cognos_Jan2017

The code is ...
maximum ([IIMS - Business Layer].[General Incident Details].[Date Of Incident]) for [IIMS - Business Layer].[General Incident Details].[Incident Location]

... which gets a parsing error at or near position 84, which is, marked by X preceding 84 ...
X[IIMS - Business Layer].[General Incident Details].[Incident Location]

What am I doing wrong ... still new to Cognos.

TIA, Bob

New_Guy

Hi,
I dont think you need a ')' bolded, in the middle and it should be at the end.
maximum ([IIMS - Business Layer].[General Incident Details].[Date Of Incident]) for [IIMS - Business Layer].[General Incident Details].[Incident Location])
Good luck
New guy

Cognos_Jan2017

That was it !!!  THANK you New_Guy.

Now, a new problem.

How do I see ONLY the Maximum [Date of Incident]
record for each [Incident Location]?

Run those two Fields only?  Then another Query Calculation
to check Current_Date - the Maximum [Date of Incident]?

... Will try after sending this.

I ran Microsoft Access Aggregate queries a long time, but am
adjusting to doing the same in Cognos.

TIA, Bob

Cognos_Jan2017

That didn't work ...
How do I see ONLY the Maximum [Date of Incident]
record for each [Incident Location]?

Run those two Fields only?  Then another Query Calculation
to check Current_Date - the Maximum [Date of Incident]?

======================================================
It still shows any records for that Location that aren't the Maximum (most recent date).
We need to see ONLY the most recent (Maximum) [Date of Incident] record to calculate
how long ago that occurred.  Then take those values to assign to dated intervals as a
crosstab column.

TIA, Bob

New_Guy

Hi,
Create a  filter [Date of Incident] = maximum([Date of Incident] for column1, column2).
Let us know if you face any issue.
Good luck
New guy

Cognos_Jan2017

Your ...
[Date of Incident] = maximum([Date of Incident] for column1, column2)

I tried as ...
[Date of Incident] = maximum([Date of Incident] for [Incident Location], [Date of Incident])

It didn't like that.

TIA, Bob

Cognos_Jan2017

I resolved this ...

A Summary Filter of ...
[Date Of Incident] = Maximum([Date Of Incident] For [Incident Location])
... works.