cancel
Showing results for 
Search instead for 
Did you mean: 

Percentage calculation based on subtotal in webi 4.0

Former Member
0 Kudos

Hi Experts ,

How do i calculate the % column in webi 4.0  so that % would be calculated by the amount of Primary channel / Subtotal ) in one block.

=[Amount Of promary Channel]/Sum([Amount Of promary Channel]) In Block  - not giving correct output.

Thanks,

Rajib

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Just use the In calculation context method

This gives percentage per Channel Code:

=[Amount Of promary Channel]/Sum([Amount Of promary Channel]) in ([Channel Code])

This gives percentage of the grand total:

=[Amount Of promary Channel]/(Sum([Amount Of promary Channel]) in Block)

Former Member
0 Kudos

Hi Rajib, As per my understanding, you want to show percentage on the base of subtotal.

that means if you set break on the Compony then percentage column should contain the percentage calculated on the basis of compony subtotal.

like this...(just one block of break)

then just use the simple percentage function ( =percentage(amount) ), this will automatically calculate the percentage based on subtotal.

and if you want to show 100% in subtotal row also then you can use formula= (amount/sum(amount)),

i think we dont need to use contex operator here.

formula for AHW total row = amount/sum(amount)

Let me know if this will help you,

Thanks,

Nitin

former_member210032
Active Participant
0 Kudos

Hi Nithin,

How you get there 100.00% value

if we apply break on Company we can't get 100.00% value.

if we apply section on company we get  100.00% value in the report.

Regards

Mustafa

Former Member
0 Kudos

Hi Mustafa I wrote formula in subtotal row formula for AHW total row = (amount/sum(amount)) it will calculate on the basis of total for break i..e if you apply break on compony then it will calculate on the basis of total for one compony thats why it doesnt affect by sum(amount)(as it will calculate the sum for only one compony) Thanks, Nitin

Former Member
0 Kudos

Hi Rajib,

Try the below:

[Amount of Primary Channel] / Sum([Amount of Primary Channel]) In ([Company])

Similar formula for a case in my report worked.

Regards,

Srilakshmi B

Former Member
0 Kudos

Hi,

Try These .

=[Amount Of promary Channel] / (Sum([Amount Of promary Channel]) In Block )

=[Amount Of promary Channel] / (Sum([Amount Of promary Channel]) In Report )

Former Member
0 Kudos

Hi Nikhil ,

Thanks a lot but it its not working !

I have added break on the company code on same block to group it, subtotal is correct but the % is getiing calculated based on the grand total , any idea

In the following example i want each amount of the primary channel to be divieded by Subtotal value to get the % on the same report block - possible ?

Former Member
0 Kudos

Hi,

=[Amount Of promary Channel] / (Sum([Amount Of promary Channel]) In Break )

But If you want 2 values

1)     Detail rows % for subtotal in company

2)     Company wise % for Grand Total

Then use following .

One which you were using in Table rows previously .

&

the formula from me will be in Sub Total for Company Code .

Former Member
0 Kudos

Hi Nikhil.

Did you manage to work this out? I have the same problem, and I've tried 'in block', in section', 'in break' etc but they all give the same result. Like you, I need the percentages in each row to be based on the total for that break or section, not on the overall report total. Easy in BW!

Thanks,

Patrick

Former Member
0 Kudos

Try [Amount of Primary Channel] / ([Amount of Primary Channel] In ([Company])

Former Member
0 Kudos

Cracked it using the Section functionality!

So, in Nikhil's example set Sections by Company and then the formula for the % Measure is:

=[Amount Of promary Channel] / (Sum([Amount Of promary Channel]) In Section )

Former Member
0 Kudos

Rajib, Try this,

=[Amount of Primary Channel] / (sum([Amount of Primary Channel]) in ([Company Code]))

saurabh_sonawane
Active Contributor
0 Kudos

Hi Rajib,

We had try it and its work