Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

chitemerere
Valued Contributor

Row count based on selections

I have a straight table with about 17 000 records.  I have created a textboox with a Count(Distinct(TradeName)) which counts the number of distinct TradeNames in the straight table as is illustrated below:

Screen Shot 2015-12-09 at 15.06.04.png

The distinct count of TradeName gives a value of 3801 as illustrated above.  I would want this value to change based on various selections with various dimension values for example filter by date which should reduce the number 3801.

How can this be accomplished in QV?

Tags (1)
1 Solution

Accepted Solutions
roger_stone
Contributor III

Re: Row count based on selections

Shouldn't you be counting [FDA Trade Name] ?

View solution in original post

13 Replies
balrajahlawat
Esteemed Contributor

Re: Row count based on selections

It should work automatically with this expression: Count(Distinct(TradeName))

You no need to do anything..

If your selected Dimension is associated with TradeName...It will change as per your selection

Re: Row count based on selections

I think it should already change if this -> Count(DISTINCT TradeName) is what you are using. It is not filtering based on selections?

chitemerere
Valued Contributor

Re: Row count based on selections

Many thanks, it is not changing based on any selections.

chitemerere
Valued Contributor

Re: Row count based on selections

Hi Sunny

There are no changes based on any selections.

roger_stone
Contributor III

Re: Row count based on selections

Is the table 'Detached'?

Capture.PNG

chitemerere
Valued Contributor

Re: Row count based on selections

HI Roger, thanks, it is not detached.

My data model is as below:

Screen Shot 2015-12-09 at 15.41.56.png

balrajahlawat
Esteemed Contributor

Re: Row count based on selections

Sample Data?

roger_stone
Contributor III

Re: Row count based on selections

Shouldn't you be counting [FDA Trade Name] ?

View solution in original post

Re: Row count based on selections

I cannot see field TradeName in your Data Model.

Should it be Count ( Distinct ( [FDA TradeName] ) ) ?

Or maybe I am missing something.