0
votes

I have a requirement as below. I need to show the number of clients in a chart based on their income and age group.

X-axis -> <10k <20k <50k <100k <200k+

Y-axis -> Age Group(20-30, 31-40, 41-50, 51+

The chart should show count of clients who falls on income and age range. For example, there will be 20 clients in the age group 20-30 with an income < 10k and 30 clients with an income less than 100k. then I have to show 20 on a bar chart under 20-30 Age group and <10k range.

Is this achievable in chart in SSRS?

1

1 Answers

1
votes

YES - it is possible.

In the chart group by, you would need to use an Expression to achieve your income and age groups.

=IIF(FIELDS!AGE.VALUE < 20 THEN "<20", 
 IIF(FIELDS!AGE.VALUE < 30 THEN "20-30", 
 IIF(FIELDS!AGE.VALUE < 41 THEN "31-40", 
 IIF(FIELDS!AGE.VALUE < 51 THEN "41-50", 
 "51+"))))

and then a similar one for your income axis:

=IIF(FIELDS!INCOME.VALUE < 10000 THEN "<10K", 
 IIF(FIELDS!INCOME.VALUE < 20000 THEN "<20K", 
 IIF(FIELDS!INCOME.VALUE < 50000 THEN "<50K", 
 IIF(FIELDS!INCOME.VALUE < 100000 THEN "<100K", 
 "<200K"))))

Now that I look at it, your last range is actually 100,000k+

What kind of chart are you making? The Y axis would usually contain the count of clients for each group.

UPDATE: For a bar chart, you would use the series to create a separate bar for each Age group in the Income group like this: enter image description here Imagine the Double-Precision category as your Income group and the type category (Atom, Athlon, Xeon) as your Age.