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

Pulling records that have a common sequence

Started by JoelR, 06 May 2008 11:32:39 AM

Previous topic - Next topic

JoelR

How do I pull work orders, using Cognos report studio, that have a status which have been cancelled in a succession/ sequence of 2 or more times?

almeids

Hmmm...seems we'd have to know a little more about how your data is stored, don'tcha think?
What's the key, what constitutes cancelled, what's the definition of "in sequence"?

Let's guess a record that looks like Date, WO#, Cancel/Uncancel flag and assume in sequence means cumulatively for all time...

Convert cancelled/uncancelled flag into 2 data items: if (cancelled) then (1) else (0) and vice versa.
Sort by date.
Add running totals for your cancelled and uncancelled data items.
Filter on running-total(cancelled)>2 and running-total(uncancelled)>2...you may only need 1 of the data items...you may also want to use an equality test so you only get the work order once.






JoelR

Thank you, you were very helpful.  I am good to go now.  Sorry about not supplying more information to better help me with a resolution, but your help took me over the edge.