September 5, 2008 at 6:45 am
HI! I'm trying to display percetages in my PIE chart but I'm getting incorrect values.
My query is like so:
SELECT COUNT(EarningRange) AS ER, Race, Gender, CASE WHEN TransferType = 'TransferIn' THEN 'Transfers' END AS HeadCount
FROM headcountdec
WHERE (Period BETWEEN 200801 AND 200807) and (TransferType = 'TransferIn') AND (headcount = 'TransferCluster')
GROUP BY TransferType, EarningRange, EE_OCCUP_LEVELS, Race, Gender, headcount
Order BY Race, Gender
-------------------------------------
This query will give you the results:
AfricanColouredIndianWhiteTotal
FMFMFMFM
Transfers 211764831410 83
The I have a pie chart:
ER ---- Data fields
Gender ---- Series Fields
Race ---- Category Fields
On the edit chart value - I have:
Values tab - Value =Sum(Fields!ER.Value)
Point lables tab - Data label =Fields!ER.Value/Sum(Fields!ER.Value)*100
Format code = 0.00%
Now this chart is lying to me: When I run it I get these figures:
14.29% African Females
14.29% White Females
5.88% African Males
16.67% Colured Females
25.00% Cloured Males
12.50% Indian Females
3.33% Indian Males
10.00% White Males
I do not understand how can I have the same percentage for white and African females when according to data I have different numbers
Somebody please help
September 5, 2008 at 8:37 pm
Can you post some source data so I can run the query myself and create a report to see how it works?
Jack Corbett
Consultant - Straight Path Solutions
Check out these links on how to get faster and more accurate answers:
Forum Etiquette: How to post data/code on a forum to get the best help
Need an Answer? Actually, No ... You Need a Question
September 8, 2008 at 8:31 pm
Because you're basing your percentages on Earning Range values not on the count in each Group
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply