# How to do Selective Count in WebI Report

Hi

I need to perform following task in Webi Report. I have a group of participants belonging to different age groups, the participants are distributed among 4 programs. I need to plot a graph with programs against participants. for this i need to differentiate the participants into three age groups <12, 12-15 and >15. Please let me know how to selectively count age of the participants and group into these categories. Then, I want to plot youth service programs on X axis and age vertical stacked on the Y axis.

##### Erika Atencioreplied

Let's suppose this is your data:

participant age

mary kate 12

paisley ann 15

klea lorraine 17

aslan john 13

jonas louis 12

mark caspian16

yancy marie 11

1- Create a table using participant dimension and age measure.

2- Add a third column and palce this formula in the third column:

` =If [age]<12 Then "group<12" Else If [age] >= 12 And [age]<=15 Then "group 12-15 " Else If [age]>15 Then "group >15"`

3- Your table should look like this:

[url] https://weblogs.sdn.sap.com/weblogs/images/252123862/test.JPG[url]

then, on third column formula, press Create Variable button.

Name: my formula column

Qualification:dimension

Press Ok

4 - Now create a second table. it should have to columns. In the first one insert your new object 'My column formula'. In the second column insert this formula :

` =Count([participant])  `

press Create Variable button.

Name this formula: my age participant count.

Qualification: measure

You can see it counts all the partipants according to their age range classification.

5 - Convert this table into a graph or insert an empty graph and drag 'My column formula' in x axis and 'my age participant count' measure in y axis

regards

Erika

Edited by: PadawanGirl on Sep 26, 2011 11:14 PM

Edited by: PadawanGirl on Sep 26, 2011 11:25 PM

0 View this answer in context