on 05-05-2014 1:05 PM
Hi,
I am trying to create a sum of all values in a table which are greater than a specific threshold. Maybe someone can help me here. I haven't figured whether and how this is possible.
Here is a simple example:
Dimension | Measure |
---|---|
A | 12 |
B | 8 |
C | 25 |
D | 3 |
E | 11 |
I would like to sum up all values that are greater than 10. So I would have 12 + 25 + 11 = 48.
The formula I tried in WebI was:
=Sum([Measure]) Where ([Measure] >= 10)
The formula is validated with no errors, but the result gives me the grand total ignoring the where clause.
In this example, that would be 12 + 8 + 25 + 3 + 11 = 59.
Any idea, how to achieve a formula like the above?
Thanks and regards,
Stefan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Stefan,
If you have aggregation set on Anzahl measure at the semantic layer (Universe) or data source level, this might be why you're seeing a different.
Try:
=Sum([Anzahl] In ([Cluster]) Where ([Anzahl] In ([Cluster]) >= 90))
This will override the default aggregation you may have to avoid summing BEFORE analyzing your WHERE clause.
I hope that helps!
Carly
(had to edit, realized I left in my testing #s for eFashion Sales Revenue)
Hi Carly,
great, this works!
Thanks a lot!
I played around and figured I can can leave out the reference to [Cluster] in the where clause. So it looks like this now:
=Sum([Anzahl] In ([Cluster]) Where ([Anzahl] >= 90))
There is no specific aggregation setting of the measure on data base level, by the way.
Have a good day,
Stefan
Hello,
I am trying to create summary report of the detail report .
for e.g I have six details reports in one bo document and they have there total at end respectively and I want to create one main(summary) report which will include only the sum of the six different report.
I was thinking to do it using formula sum() but how to filter it in sum(). like i want to use where clause in sum()
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
83 | |
10 | |
10 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.