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

Announcements
See why IDC MarketScape names Qlik a 2025 Leader! Read more
cancel
Showing results for 
Search instead for 
Did you mean: 
narender123
Specialist
Specialist

Count of records

Hi All,

I have 2 database.One database have data upto 2015 and 2nd database have data after 2015.

I have to count of amount of both db on the basis of agent.But it is showing wrong count of  data.

So have to show both datbase data.

*****1st db table

table1:

load

agent,

receipt_date,

amount_due

from table1;

concatination(table1)

********2nd db table

table2:

load

agent,

receipt_date,

outstanding

from table2;

my expression is=

=AGGR(COUNT({<Year={$(=max(Year))}>}outstanding),agent)+AGGR(COUNT({<Year={$(=max(Year))}>}amount_due),agent)

5 Replies
sunny_talwar

Do you have agent as the dimension? If you do, then I don't see why you need Aggr() here, May be try this:

=Count({<Year={$(=max(Year))}>}outstanding) + Count({<Year={$(=max(Year))}>}amount_due)

swuehl
MVP
MVP

If you want to concatenate the tables, you need to use

CONCATENATE (table1)


Why have you used a set expression in both Count() functions to limit the records on the same max Year?

narender123
Specialist
Specialist
Author

Hi Swuehl,

I used the same concatenate.

I chacked my old DB and found user has done some entry of 2016 in old db.

So its showing due to this.

Thanks for your reply. 

Narender

narender123
Specialist
Specialist
Author

Hi Sunny,

I chacked my old DB and found user has done some entry of 2016 in old db.

So its showing due to this.

Thanks for your reply. 

Narender

sunny_talwar

Awesome, if you have resolved the issue please close this thread by marking a correct and helpful answers.

Best,

Sunny