Skip to Content
0

How to handle context in webi report

Apr 04, 2017 at 02:36 PM

137

avatar image

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?

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Best Answer
AMIT KUMAR
Apr 04, 2017 at 04:30 PM
0

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.

Show 3 Share
10 |10000 characters needed characters left characters exceeded
Amit your awesome! Worked first round. Thank you! I do have another question. There were many other dimentions in the table I was just trying to make the example simpler. So would it be fair to say that the dimensions you include would be any dimension that this value could be rolled up to or aggregated to? One of the reasons for questioning it further is that I have a nurse unti in the detail table also. This method worked without having to bring nurse unit into the context. Basically there are multiple nurse units per LOC. thanks again. I can make this another question if needed.

Scott

1

is nurse object making data aggregate if you remove from the detail object? If yes then you need to include in the foreach.

or share some example how is impacting.

0

Thanks!

0