on 04-29-2015 9:07 AM
Hi team,
I have created one calculation context :
Let say i have following field in the DP ,
Year,Quarter,state,salesrevenue
and in the block i have the following fields :
Year, state, revenue .
Now i have created one column to calculate the max revenue in the quarter for that year.
I have written the following formula
MAX( [REVENUE] FOREACH [ QUARTER] ) IN ([YEAR]).
but when i execute the report , i am getting the text with the formula.
Pls help me.....
Hi,
Please try to create a variable of type measure and use the formula.
=Max([Sales revenue] ForEach ([Quarter])) In ([Year])
I have attached the screen shot of the output after doing the same.
Kindly let me know if it solved your problem.
Note : I just renamed CalcRevenue2 to CalcRevenue3 as variable name. You can ignore this.
Cheers
Jim
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
The use of output context In ([year]) means that you are displaying your maximum revenue
for each quarters year wise.
Here by using foreach([quarter]) you have added quarter context because
on report you are using only year & state objects
that means if you like to calculate maximum revenue as per quarter wise then by using
foreach([quarter]) you have added input context .
now if you are not giving in([year]) as an output context then
Bo will consider year & state as default output context & that means Bo will get maximum
revenue for each quarter first and then display it as per year & state wise
but as per your requirement you want only year wise maximum revenue so you have mentioned
year in output context.
I hope it will help you in future also.
Thanks,
Swapnil
Hi,
Create a variable and choose the qualification type as Measure.
MaxSales=MAX( [SAELSREVENUE] FOREACH [ QUARTER] ) IN ([YEAR]).
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi ravi,
But some times it will work correctly even though i right click---> create column , i don't think that might be the issue...
Need one more info :
MaxSales=MAX( [SAELSREVENUE] FOREACH [ QUARTER] )
IN ([YEAR]).
what is the main use of IN ( [ YEAR ] ) ( output context ) . is it mandatory to get the output.
can u pls explain a little bit about the output context that we give to get the output.
=MAX( [REVENUE] FOREACH( [ QUARTER]) ) IN ([YEAR])
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
You have missed "=".
your formula should be =MAX( [REVENUE] FOREACH [ QUARTER] ) IN ([YEAR]).
Thanks,
Tanveer.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
91 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.