Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

Not applicable

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..

Tags (3)
1 Solution

Accepted Solutions
Highlighted
mdmukramali
Valued Contributor II

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.

5 Replies
mdmukramali
Valued Contributor II

Re: filtering and grouping the data

Dear Raja,

kindly find the attached file.

i hope it will help you.

Thanks, !

Mukram. !

Not applicable

Re: filtering and grouping the data

Dear Mohammed,

Thank you for your generous help, but

I cannot open your file as it stated

2.PNG.png

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

Best Regard!

Daniel

Highlighted
mdmukramali
Valued Contributor II

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.

vishalwaghole
Valued Contributor II

Re: filtering and grouping the data

Hi Raja,

Try this,

Go to Edit Script,

TEST:

LOAD * Inline [

Age

1

5

8

2

6

7

4

5

]

;

LOAD     *,

        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

Re: filtering and grouping the data

Hi,

You can even use Buckets

Script

LOAD *, class(Age,3) as Bucket;

LOAD * Inline

[

Age

1

5

8

2

6

7

4

5

]

;

Chart Type Pie Chart

Dimension

Bucket

Expression

count(Age)

Regards

ASHFAQ