Getting MIN and MAX dates in table in SAP Web Intelligence while using a Break


This can be achieved by creating an Indicator as per condition you are looking for- minimum drawn date time for POST-Test and Maximum drawn date time for PRE-Test.

 Once you create this indicator, it will show “Y” for the rows highlighted in yellow as per condition and “N” for other rows.

=If ([Drawn date] = Min([Drawn date]) In ([Patient ABO/RN])  Where ([PrePost] = "POST") )
 Or ([Drawn date] = Max([Drawn date]) In ([Patient ABO/RN])  Where ([PrePost] = "PRE")  )
 Then "Y" Else "N"

You need to apply a filter for rows with indicator value- “Y”.

Other option is you can create 3 variables as below −

Max Accession: =Max([Accession]) Where ([Variables].[Pre/Post] = "PRE") In ([Patient Birth Date])
Min Accession: =Min([Accession]) Where ([Variables].[Pre/Post] = "POST") In ([Patient Birth Date])
Accession Min/Max= If ([Accession]=[Min accession])Then 1 ElseIf ([Accession] = [Max accession]) Then 2 Else 0 (By using these, you will get 1 to the min accession, 2 to maximum and 0 to the rest of values in the report)

Then apply a filter with a condition to select values which are greater than 0.

Updated on: 12-Mar-2020

902 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements