cancel
Showing results for 
Search instead for 
Did you mean: 

Calculating on data from two seperate blocks in WebI

Former Member
0 Kudos

Dear All,

I have a report in which data from two separate blocks should be divided.

BLOCK 1

Dimension1 Dimension2 Measure1

1 a 100

2 b 200

SUM: 300

BLOCK 2

Dimension3 Measure2

a 500

b 500

SUM : 1000

Now my requirement is to divide 300/1000. FYI, Dimension2 and Dimension3 are merged dimensions.

And the two blocks are from two separate queries.

Thanks a lot in advance

Accepted Solutions (0)

Answers (1)

Answers (1)

amitrathi239
Active Contributor
0 Kudos

Hi,

create two variables like Test1 for Sum(Measure1)and Test2 for Sum( Measure2).

If you divide Test1/Test2 then what is happening.Are you getting results or wrong results?

Thanks,

Amit

Former Member
0 Kudos

Thank you for your reply Amit.

That will give the sum of the entire measure I am bringing into the report...

since I am having a rolling report based on my system date (and each quarter data that comes up is actually the sum of the last 4 qtrs), i have a couple of block filters on the report. So sum variable will essentially give me the entire sum. But the sum in the block is required for the calculation

Hope I explained the complexity clearly !

Thanks again for the turn around!!

Former Member
0 Kudos

i think you'll have to use some 'where' sentences to control the values that must be summarized. ie

= (query1.amount where (query1.dimension_used_in_filter1 = 'ABC')) + (query1.amount where (query1.dimension_used_in_filter2 = 'XYZ'))