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.

Method 1: Using Indicator with MIN and MAX Functions

Create an indicator variable using the following formula ?

=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" to display only the required records.

Method 2: Using Multiple Variables with Accession

Alternatively, 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 variables, you will get 1 for the minimum accession, 2 for maximum accession, and 0 for the rest of values in the report.

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

Conclusion

Both methods effectively filter MIN and MAX dates in SAP Web Intelligence tables using breaks, with the first method using a direct indicator approach and the second providing more granular control through multiple variables.

Updated on: 2026-03-13T18:20:25+05:30

1K+ Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements