Qlik Community

Qlik DataMarket Discussions

Discussion Board for collaboration regarding Qlik DataMarket.

joaopaulopato
New Contributor II

Count rows with specific attributes

Tables


RESTAURANTS

     NAME_RES

PRODUCTS

     NAME_PROD

     PRODUCER

RESTAURANTS_PRODUCTS

     NAME_RES

     NAME_PROD    

I want to count how many Products from a specific Producer do i have in a given Restaurant.

Anybody can tell me how to solve this ?


Thanks !

2 Replies

Re: Count rows with specific attributes

May be create a straight table with Dimensions -> PRODUCER and RESTAURANTS and Expression -> Count(DISTINCT Products) or Count(Products)?

joaopaulopato
New Contributor II

Re: Count rows with specific attributes

I have a Map with GeoPoints corresponding each one to a Restaurant.
Each restaurant can have products from two different producers.

I need something that works like this: SELECT Product FROM RESTAURANTS_PRODUCTS WHERE Name = "restaurantX" AND Producer="producerX"

This query would retrieve the products from restaurantX produced by producerX. I just need the number of rows retrieved in order to customize the restaurant marker on the map.

Community Browser