5 Replies Latest reply: Jul 15, 2014 5:57 AM by Ashfaq Mohammed

# filtering and grouping the data

I am very new to qlikview, currently i am facing a problem on how to filtering the data and represent them in my pie chart.

for example:

this my excel file

age

1

5
8
2
6
7
4
5

then i want create a pie chart that shows 3 groups of age which are (age <=3 , 3 < age < 5 and age >= 5 ).

the pie chart should look like this..

• ###### Re: filtering and grouping the data

Dear Raja,

kindly find the attached file.

Thanks, !

Mukram. !

• ###### Re: filtering and grouping the data

Dear Mohammed,

Thank you for your generous help, but

I cannot open your file as it stated

Could you please to explain to me how to overcome this issue? or write the syntax here?

Best Regard!

Daniel

• ###### Re: Re: filtering and grouping the data

Dear,

PFA.

Syntax.

Exp 1:

=Count({<Age={"<=3"}>}Age)

Exp 2:

=Count({<Age={">3 <=5"}>}Age)

Exp 3:

=Count({<Age={">5"}>}Age)

Thanks,

Mukram.

• ###### Re: filtering and grouping the data

Hi,

You can even use Buckets

Script

[

Age

1

5

8

2

6

7

4

5

]

;

Chart Type Pie Chart

Dimension

Bucket

Expression

count(Age)

Regards

ASHFAQ

• ###### Re: filtering and grouping the data

Hi Raja,

Try this,

Go to Edit Script,

TEST:

Age

1

5

8

2

6

7

4

5

]

;

if(Match(Age,1,2,3),'age <=3',

if(Match(Age,4),'3 < age < 5',

if(Match(Age,5,6,7,8),' age >= 5'))) as Age_Range

Resident TEST;

Create Pie chart with Dimension as Age_Range and Expression as Count(Age)

Hope it will make you help.

-- Regards,

Vishal Waghole