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

Filter for latest datetime when multiple data items match.

Started by tims69camaro, 19 Mar 2024 03:40:54 PM

Previous topic - Next topic

tims69camaro

I'm wanting to filter the below table when dataitem Location and Item match in two or more columns, I only want to keep the latest timestamp occurrence.

Location   Status   Item   Qty   Timestamp
BP1--0-056-A-   75   039094   36   Mar 15, 2024 1:24:35 PM
BP1--0-056-A-   75   073434   0   Mar 15, 2024 1:24:35 PM
BP1--0-056-A-   75   039094   0   Mar 15, 2024 3:05:25 PM
BP1--0-056-A-   75   073434   36   Mar 15, 2024 3:05:25 PM

I'm having trouble coming up with a solution. The results would filter out the top two rows, if it worked.

Any help is appreciated.


cognostechie

You can create a filter

Timestamp = maximum(Timestamp for Location, Item)

tims69camaro

I figured out a solution. I found a similar issue someone else posted and was able to modify what they did and it worked.

Filter: [Timestamp] = maximum([Timestamp] for [Location],[Item])

I didn't realize I could list multiple data items with comma separation after the "for".

Hope this helps someone in the future. Collaboration is BOSS...

cognostechie

Amazing that you 'found a similar issue someone else posted' which was exactly the same as I posted !! Wonderful !