suming only selected rows

I have a issue where I want to sum a specific rows in a table and not others

E.g.

Start Table

Col1 Col2 Col3 Col
25 25 100 200
27 27 100 200
26 25 100 200
25 25 100 200

Add if statement to remove row where Col1 <> Col 2

Col1 Col2 Col3 Col
25 25 100 200
27 27 100 200
26 25
25 25 100 200

Now I want to insert a sum

Col1 Col2 Col3 Col
25 25 100 200
27 27 100 200
26 25
25 25 100 200

  •      -            300       600
    

But Busines Objects wants to show

Col1 Col2 Col3 Col
25 25 100 200
27 27 100 200
26 25
25 25 100 200

  •      -            400       800
    

I have tried creating a flag if col 1 = col 2 then 1 else 0 and then tried to use this flag as a where in the sumeg sum col3 where flag = 0.

Doesn’t work

Any Suggestions ???


Grizzly-Law :uk: (BOB member since 2004-07-01)


Col1Col2 Col3 Col4 
25   25   100   200 
27   27   100   200 
26   25 
25   25   100   200 
 -    -    400   800 

In my opinion, the correct formula for COL3 is:

= IF ( = ) Then Else 0

The correct formula for COL4 is:

= IF ( = ) Then Else 0

Then, you FORMAT che cells containing these formulas using a condition in order to hide content if <> .


Donald Duck :mexico: (BOB member since 2004-07-29)

I assume your are talking about report filters?

A) Can you apply your filter Col1 <> Col2 as a condition in your query panel instead?

B) If you have to use report filters make sure that your formulas are not using any NoFilter function

C) Are you using multiple data providers? If so are all common dimensions properly linked and are you using the function MultiCube for your measures in the report?


Andreas :de: (BOB member since 2002-06-20)

I have found a solution using document contexts.

Thanks for the suggestions.

Andrew


Grizzly-Law :uk: (BOB member since 2004-07-01)