0% found this document useful (0 votes)
27 views2 pages

Stone, in Other Words To Solve Two Problems at One Time With A Single Action

This document discusses the context operators IN, ForEach, and ForAll in Webi reports. It provides examples of when each would be used, such as using IN to add a column showing maximum revenue by quarter within years, ForEach to show maximum revenue for each quarter, and ForAll to remove dimensions from the context like removing quarter to show total yearly revenue. Examples are provided to illustrate how each operator works and the impact on the report output. The document aims to explain all aspects of these important context operators.

Uploaded by

Reza Ahmad
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
27 views2 pages

Stone, in Other Words To Solve Two Problems at One Time With A Single Action

This document discusses the context operators IN, ForEach, and ForAll in Webi reports. It provides examples of when each would be used, such as using IN to add a column showing maximum revenue by quarter within years, ForEach to show maximum revenue for each quarter, and ForAll to remove dimensions from the context like removing quarter to show total yearly revenue. Examples are provided to illustrate how each operator works and the impact on the report output. The document aims to explain all aspects of these important context operators.

Uploaded by

Reza Ahmad
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

Hi All,

In this blog post Getting to know about the Context Operators (IN, ForEach and ForAll). First let me
explain on this; IN, ForEach and ForAll these three operators are called Context operators. Do you
know, why today i would like to share my knowledge about this topic because context operators
mostly used in webi report.
Even you know by using (IN, ForEach and ForAll) operators; you just like Kill Two words with one
stone, in other words to solve two problems at one time with a single action.
Have you ever noticed that IN, ForEach and ForAll these three webi functions like poweful
keywords which most/ mostly serachable in Google search engine. Also in this blog post i covered
all aspects about context operators; when any why required at the time of creating webi report.
I explain on these three operators below using an example:

In context operator – when / why we use?

For to me using In context operator to specifies dimensions explicitly in a context.

Example:- you have a report showing Year and Sales Revenue, but our requiremnent is to add one
more column which showing maximum revenue by quarter. also you have the Quarter object in
query panel but you do not include this dimension in the report block. Instead, you want to include an
additional column to show the maximum revenue by quarter in each year.

Solution:- By Using the In context operator, you can achieve the Max Quarterly Revenue using
below formula.

Max ([Sales Revenue] In ([Year];[Quarter])) In ([Year])

Finally Your report looks like this:

ForEach context operator – when and why we use?

For to me using the ForEach operator to add dimensions to a context.

Example:- How To show the maximum revenue for each Quarter in a report which having the
Quarter dimension in query panel but does not include it in the block:

Solution:- Using the ForEach context operator, you can achieve the same result with using below
formula:

Max ([Sales Revenue] ForEach ([Quarter])) In ([Year])

How does work/ Above formula explanation:- You know Year dimension is the default input context
in the block. So, by using the ForEach operator, you add the Quarter dimension to the context, by
giving an input context of ([Year];[Quarter]).
Finally Your report looks like this:

ForAll context operator – when and why we use?


For to me using the ForAll context operator to remove dimensions from a context.
Example:- You have a report showing Year, Quarter and Sales Revenue and you want to add a
column that shows the Yearly total revenue.

Solution:- Using the ForAll context operator, you can achieve the same result with using below
formula:
Sum([Sales Revenue] ForAll ([Quarter]))
How does work/ Above formula explanation:- By default you have input context (Year; Quarter), for
total revenue by year the input context needs to be (Year); Therefore, you can remove Quarter from
the input context by specifying ForAll ([Quarter]) in the formula, which looks like above.

Note:- You can also achieve the same result by using the the In operator; in this case the formula is
below:
Sum([Sales Revenue] In ([Year]))
Finally Your report looks like this:

I hope you enjoyed lots and learned something new while reading this document.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy