Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Highlighted
Not applicable

Count function on Primary key

I can not allow to use count function on Primary key but if i rename it then i can use count function on that primary key......how it is possible????

yojas

21 Replies
Not applicable

Count function on Primary key

Hi,

Count is an aggregation function and to use any aggregation function (in load script), you will need to aggregate it on the basis of other fields you are loading in parallel.

If this is the only statement then it will work without group by also.

Can you please share your app or load statement where you are having issue?

..

Ashutosh

Not applicable

Count function on Primary key

hi,

actually i read somewhere that we can not apply count function on primary key....but i donk know why it is so??

yojas

Not applicable

Count function on Primary key

Yeah,

I also have some blurred memory of reading it somewhere but I was not able to recall it or find the source where I read it.

So, I tried to use it on a link field in Qlikview and it worked fine for me. So, I was not able to reach on any justification.

That is the reason, i had said to you to share the app or load statement where it was not working for you.

That way, I will be able to conclude if it works or not.

..

Ashutosh

Not applicable

Count function on Primary key

and yes we can not show frequencies of the link fields in list box.

Not applicable

Count function on Primary key

or may be in that post it would have been refering to count of values shown in document properties under the tables tab where if any field is a key field then it shows the count of values 0 for that field.

because, I tried count function in front end also on key field and it works.

..

Ashutosh

Not applicable

Count function on Primary key

what are the link fields in list box? Is it a key which is primary key of 1 table and foreign key of other table?and if it is that key then we can show frequencies over there.......

yojas

Not applicable

Re: Count function on Primary key

Hi Yojas,

In Qlikview there are no primary or foreign keys, there are only keys.

Key field is a field which is present in more than one table so, it works as a link between those tables, so sometimes is also referred as link field.

when you take any field in list box and go to the list box properties -> general then there will be a check box for show frequency which will only be available for the non key fields.

..

Ashutosh

Not applicable

Count function on Primary key

i understand what you want to say and i tried to apply that option for  key fields and it is showing me frequencies of that field......

Not applicable

Count function on Primary key

I don't think that you can see frequencies of the key fields.

You may be seeing it for some non key field, please recheck it.

Community Browser