# New to QlikView

Discussion board where members can get started with QlikView.

Announcements
Leverage your QlikView investment to modernize BI – see how! Join Group
cancel
Showing results for
Did you mean:
Highlighted Contributor III

## Count of value pairs

Hi there,

My first post in the community, though having been months with Qlikview.

Just would like to seek some help on how I can count the occurrence of the Value Pairs. For example, I have a table of (x,y) with values: (10,20), (15,30), (10,20), (10,20), (15,20). How can I count the occurrence of each value pair which gives:

(10,20) = 3

(15,30) = 1

(15,20) = 1

Looks simple (I guess) but I cannot find an answer from the community for a whole day search. Maybe I used the wrong keywords. Thanks in advance.

Snowman

Tags (3)
2 Solutions

Accepted Solutions
Highlighted Specialist II

## Re: Count of value pairs

Hello,

are this two field your datamodel like "x" and "y"?

if so first approach could be a table with

dimension:  =x&y

expression: count(x&y)

maybe you want to create this pair as one column in script that you dont have to use a calculated dimension.

regards

tim

Highlighted Creator II

## Re: Count of value pairs

Hello.,

In data model for example you have a table

fields x and y

x & y as pair   //make this new field

from path;

take stright table

dimesion x and y

expression --> =count(pair)

---------------------------------------------------------------

directly do in front end

take stright table

dimesion x and y

expression --> =count(x & y)

----------------------------------------------------------------

Based on your requirement do as you can best

3 Replies
Highlighted Specialist II

## Re: Count of value pairs

Hello,

are this two field your datamodel like "x" and "y"?

if so first approach could be a table with

dimension:  =x&y

expression: count(x&y)

maybe you want to create this pair as one column in script that you dont have to use a calculated dimension.

regards

tim

Highlighted Creator II

## Re: Count of value pairs

Hello.,

In data model for example you have a table

fields x and y

x & y as pair   //make this new field

from path;

take stright table

dimesion x and y

expression --> =count(pair)

---------------------------------------------------------------

directly do in front end

take stright table

dimesion x and y

expression --> =count(x & y)

----------------------------------------------------------------

Based on your requirement do as you can best

Highlighted Contributor III

## Re: Count of value pairs

Thank you both. Have been dragging in finding the right expression like Count() and Aggr(), but haven't thought of your advised one. Precise and concise !
Will use it as the 3rd dimension for the bubble size of the Scatter Chart.