If Sum Expression
Dear Anybody,
I have a got 'Sex' field (containing 'male','female','msm') and a 'Total' Field which sums up the numbers by month. However I have got a singular box at the end of the report where I just need to sum up the particular 'Sex'so for eaxmple the
total sum of female... I cannot just 'sum' up the 'sex' field as this will give me the sum for both 'Male' and 'Female'.
I know i may have to put the 'Total field somewhere in my expression as this contains the actualy figuers but have been stuck on thia for days, so far i have teh following expression...below ...SOmeone please help!!! :)
=sum(IIf(Fields!Gender.Value = "Female",
January 27th, 2011 1:13pm
Heres and example peeps of what the report looks like you can see the 'Female' and 'Male' totals below of what i need to populate-I hope this helps!! (the bold titles are the actual field names i use) -Thank you
Diagnosis Gender Total
A male 5
B Female 4
C male 70
D Female 5
E male 3
Female Total
Male Total
Free Windows Admin Tool Kit Click here and download it now
January 27th, 2011 1:33pm
Sorry to ask, but couldn't you just add another group? sex.
So your report would look like:
January 200
Female 150
Male 50
MSM 0
February 51
Female 30
Male 20
MSM 1
-Report Writer 'SSRS User'
January 27th, 2011 1:37pm
sorry its the original question person again i have just had to make a new profile for some reason..the answer is no as the end user wants it the exact same way as a current report which is sent by a 3rd party...i made a mistake with the 2nd post the report
acualy looks like this...
I will be needing sub totals for sexes below again
Diagnosis Gender January Febuary March
A male 5
4
B Female 4
5
C male 70
3
D Female 5
2
E male 3
11
Female Total
Male Total
Free Windows Admin Tool Kit Click here and download it now
January 27th, 2011 2:00pm
thanks though!!!
January 27th, 2011 2:00pm
Use an expression containing a sum of iif statements.
=sum(val(iif(Fields!gender.Value = "Male", Fields!qty.Value, 0)))
and
=sum(val(iif(Fields!gender.Value = "Female", Fields!qty.Value, 0)))
Free Windows Admin Tool Kit Click here and download it now
January 27th, 2011 2:51pm