Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Having trouble with the count() function

Hi, QlikView community

I have trouble with count (function).

I am trying to count number of sales for each company.

I am counting every bill that I have sent a company.

I use the expression = Count(distinct [BKPF.Document Number_BELNR])

which is supposed to count every bill and link to one company.

I know that the number of bills that I have sent to companies is total 18.852 (see attachment).

But I want to show the split between companies but I get 18.852 for every company which does not make sense.

regards, Darri Hilmarsson

1 Solution

Accepted Solutions
Not applicable
Author

Could be an issue with table associations/links. As mentioned before it would help seeing an example qvw, or at least a screenshot of the full data model (Ctrl+T).

View solution in original post

8 Replies
tresesco
MVP
MVP

Could you post your sample app that shows the issue?

Anonymous
Not applicable
Author

What do you mean by sample app?

Anonymous
Not applicable
Author

Are bill numbers and copany number available in same table or you have multiple tables.

Have you mapped those tables with common fields????????

Sample app means, please provide a qvw file with sample data so that we can understand you issue more easily.

Regards

Nitin

swuehl
MVP
MVP

Are your tables correctly linked to each other, so QV find its path from dcoument number to company?

Could you post your table view?

Not applicable
Author

Could be an issue with table associations/links. As mentioned before it would help seeing an example qvw, or at least a screenshot of the full data model (Ctrl+T).

Anonymous
Not applicable
Author

tableview.JPG.jpg

Here is the table view.

Anonymous
Not applicable
Author

I have found what the problem is.

It is problem with how I link the tables together.

I can't  get the information I want with how I link the tables together.

I am gonna change how I link the tables.

Thanks a lot for the help