Skip to Content

How to handle context in webi report

I've been struggling with the concept of context (in webi report) and would appreciate your guidance. I have a report (tab) that has two charts. The first is a summary of values and the second are the details. Both charts are on the same tab and the details table is filtered on one location. I've created a variable that generates a 1 when the Results column is not NULL. I then create another variable (called SUM SJN) to sum the number of places where Flag = 1. I want to use this second variable (SUM SJN) in the summary table. That table is going to consist of 3 columns: The total number of records (Disc) currently showing in the table (after filtering), the Sum SJN variable, and these two numbers one divided by the other. I have two queries that are merged by fin#. All values that are in these two tables come from one of the two queries and/or are detail objects. "Result" below is a detail object. The Details table is actually an all inclusive table filtered down to one location (SJN).

Table 1 (summary ) looks like:

Disc Sum SJN Sum SJN/Disc

5 3 3/5

Table 2 (details) looks like:

fin# Loc Flag Result

121 SJN 1 abc

122 SJN 1 abd

123 SJN NULL

124 SJN 1 abe

125 SJN NULL

This is webi and we are on version v4.1 sp4 on windows 2000

Flag variable

= If ( ( [LOC]= "SJN" ) And ( [ Event Code] = 2548596955 ) ) Then 1

Sum SJN variable

= sum ( Flag)

Currently my Sum_SJN = 7 rather than the 3 I'm expecting.

My question is how do I get the value of 3 and why did I get 7?

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    Apr 04, 2017 at 04:30 PM

    try this.

    = If ( ( [LOC]= "SJN" ) foreach ([fin#]) And ( [ Event Code] = 2548596955 ) foreach ([fin#])) Then 1

    You need to include all dimensions objects in the above formula which are used in the detail table beacuse you are going to use above formula independent in summary.

    Add comment
    10|10000 characters needed characters exceeded