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

 

Showing A Previous Row information on the same ROW in Framework Model

Started by gosoccer, 19 Nov 2015 12:50:15 PM

Previous topic - Next topic

gosoccer

Hi everyone,
I thought this would have been easy but doesn't seem like it.

I have two rows in the table, first one shows the present time of the crime and the second row shows the past date
of a crime.


Is there anyway to show the present time and past time of the crime on the same row using Framework Model.

So, something like below. The data shows:

Crime Id                   Status         Date
111111                         Convicted         11/12/2015
111111                          Arrested          10/12/2015

Now, the Framework Manager Subject Query would show
Crime Id                   Prior Status          Present Status
111111                             Arrested                    Convicted

Please help if you can. I'm stuck big time on this.

Thanks in advance for your help.  :) :)     

roddawg

Ok I know this is old but hopefully I can help.  I've done something similar for student records.  if you can assume you have two records this is how I would handle it. Will require you to setup two calculated fields.
Crime ID:= Crime ID
Prior:= if ([date] = MIN([date] for [Crime ID])) then ([Status]) Else Null
Present:=if ([date] = MAX([date] for [Crime ID])) then ([Status]) Else Null

This will create two records one with the Min Date and one with the Max Date
Now use Determinants to Groupby CrimeID. This will roll the two records into one.

   




Crime IDPreviousPresent
11111ARRESTEDNULL
11111NULLCONVICTED

when the determinant is applied



Crime IDPreviousPresent
11111ARRESTEDCONVICTED

gosoccer

To the person with login roddawg,

Thank you so much. I just started using what you are mentioning in your reply. It's nice to see someone confirming
the approach.

Have a wonderful@

roddawg

No problem, I've learned plenty from these forums just glad I can help when I can.