Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Counting

Hi,

I know this isn't much of a challenge but I'm still new to Qlik Sense. So here we go.

I have this kind of data:

Udklip.JPG

I like to produce tables which show me the numbers of each type of animal per farm_type. Like this:

Udklip2.JPG

Any suggestions how to script/calculate this ?

Thanks in advance.

1 Solution

Accepted Solutions
jagan
Luminary Alumni
Luminary Alumni

Hi,

Try like this

Data:

LOAD

ID,

Farm_Type,

Animal_1  AS Animal,

Number_1 AS Number

FROM DataSource;

Concatenate(Data)

LOAD

ID,

Farm_Type,

Animal_2  AS Animal,

Number_2 AS Number

FROM DataSource;

Now you can use Farm_Type and Animal as dimensions and Sum(Number) AS Expression.

Hope this helps you.

Regards,

Jagan.

View solution in original post

2 Replies
jagan
Luminary Alumni
Luminary Alumni

Hi,

Try like this

Data:

LOAD

ID,

Farm_Type,

Animal_1  AS Animal,

Number_1 AS Number

FROM DataSource;

Concatenate(Data)

LOAD

ID,

Farm_Type,

Animal_2  AS Animal,

Number_2 AS Number

FROM DataSource;

Now you can use Farm_Type and Animal as dimensions and Sum(Number) AS Expression.

Hope this helps you.

Regards,

Jagan.

Not applicable
Author

Hi Jagan,

Thanks a lot.

Works perfect for me.

Cheers,

Kenneth