on 09-10-2014 2:24 PM
Hello All,
I need to Calculate percentage distribution.
percentage distribution = number of "CHRG_SOLD" for each "CHRG_STATE_CODE" / total number of CHRG_SOLD in the US for the State "CHRG_STATE_CODE"
We are using SQL Server as the DB
I am providing sample data for your reference. Kindly help
CHRG_STATE_CODE CHRG_SOLD
CA 52
CA 31
MI 44
MI 60
MI 70
Best Regards
Sandeep
Hi Sandeep,
Here's what you need to do:
1) Create a Group on the 'Country' field and suppress the Group header and footer
2) Create a Group on the 'State' field and suppress the Group header and footer for this group
3) Right-click the CHRG_SOLD fiel > Insert Summary > Choose 'Sum' as the summary operation > Under 'Summary Location' choose 'Group #2' > Check 'Show as Percentage of' and select 'Group #1' as the field in the drop-down.
-Abhilash
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Sandeep,
Create a group on Chrg_state_code
Insert count on CHRG_SOLD for each group
Now on group footer place below formula
count(CHRG_SOLD,{group}) / count(CHRG_STATE_CODE)
i.e. count of group / total count of CHRG_STATE_CODE
-Sastry
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
89 | |
10 | |
9 | |
9 | |
9 | |
6 | |
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.