on 05-26-2011 1:53 PM
hi,
Can anyone give me idea about ForAll & Foreach in Webi report (give me example plz in details).
Regards,
ForEach context operator
The ForEach operator adds dimensions to a context.
Example: Using ForEach to add dimensions to a context
The following table shows the maximum revenue for each Quarter in a
report which contains the Quarter dimension but does not include it in the
block:
It is possible to create a formula for the Max Quarterly Revenue column
that does not include the ForEach operator:
Max ([Sales Revenue] In ([Year];[Quarter])) In ([Year])
Using the ForEach context operator, you can achieve the same result with
the following formula:
Max ([Sales Revenue] ForEach ([Quarter])) In ([Year])
Why? Because the Year dimension is the default input context in the block.
By using the ForEach operator, you add the Quarter dimension to the context,
giving an input context of ([Year];[Quarter]).
ForAll context operator
The ForAll context operator removes dimensions from a context.
Example: Using ForAll to remove dimensions from a context
You have a report showing Year, Quarter and Sales Revenue and you want
to add a column that shows the total revenue in each year, as shown in the
following block:
To total revenues by year the input context needs to be (Year); by default
it is (Year; Quarter). Therefore, you can remove Quarter from the input
context by specifying ForAll ([Quarter]) in the formula, which looks like this:
Sum([Sales Revenue] ForAll ([Quarter]))
Note that you can use the In operator to achieve the same thing; in this
case the formula is:
Sum([Sales Revenue] In ([Year]))
This version of the formula explicitly specifies Year as the context, rather
than removing Quarter to leave Year.
Simply,
Input Context: ForEach
Output Context: ForAll
Above is reference from WEBI User guide.
Regards,
Vamsee
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Measures are projected on a Webi report, meaning they appear to "roll up" to a level determined by a list of dimensions. Input context is a way to set the set of dimensions used to roll up a measure before doing a calculation, and output context is a way to set the list of dimensions used after the calculation is done.
IN is used to provide a list of dimensions to be considered, and any other dimensions present in the block are ignored.
ForEach is used to add an extra dimension that might not be included in the block (which is valid only for input context).
ForAll is used to specifically exclude a dimension, as "all" values of that dimension are used.
I have a blog post with examples of IN on a report here:
http://www.dagira.com/2010/01/04/calculation-context-part-i-overview/
Your question has inspired me to finish the follow-up post for ForEach and ForAll, so I guess I will work on that next.
Hi,
You can get the idea about ForEach and Forall in the SAP Help
http://help.sap.com/businessobject/product_guides/boexir4/en/xi4sp5_ffc_en.pdf
Thanks and regards,
Sai Kiran
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
98 | |
11 | |
11 | |
10 | |
10 | |
8 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.