Search code examples
business-objectswebi

Webi SAP BO Sum in block depending on two dimensions


I am trying to sum every line in a table summarizing it by two fields in Webi.

I have a table with the following columns:

Risk, Year, AssessedBy, Weight, Value.

I have filtered the table by Year = 2018 and Risk = "01". Thus, I only have the info for that year and that risk.

Each person assessing has a different weight in the final valuation by risk and year. What I have done is divide the assessing person's weight by the total sum of every Weight in the table [ sum(weight) in block ].

The problem is that when I delete the filter, the in block clause makes that the total sum of the weights changes to the total sum of the weights for every year in the table.

I would need something to calculate the total sum for each year and risk.


Solution

  • Just solved it! Just see Sumal Kunir answer: http://www.forumtopics.com/busobj/viewtopic.php?p=971131

    =sum([Var_a] for each(Dimension;dimension)) In (Demension)

    where var_a is the measure, foreach defines a background to base in and in defines the level at which you want to aggregate.