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

Announcements
Join us in NYC Sept 4th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Can I specify table name in an expression?

Hi All,


Just a quick question, can I specify table name in an expression?

For example if I got two tables (A and B) that all have the same column called invoice_number, and I want to specify number of invoice_number from column A only. How to do that? Should I have to load the same column twice( I means something like following in my script):

Table_A:

Load

   Customer_name,

   Invoice_Number,

   Invoice_Number as    Invoice_Number_DUP

from xxxxx.qvd (qvd)

Table_B:

Load

   Sales_name,

   Invoice_Number

from yyyyy.qvd (qvd)

and the expression is

Num(count( Invoice_Number_DUP),'###,###,###')

6 Replies
sunny_talwar

‌Without needing to duplicate you can do something like this:

Count({<Sales_name = {"=Len(Trim(Sales_name)) = 0"}>}Invoice_Number)

or

Count({<Customer_name = {'*?'}>} Invoice_Number)

Peter_Cammaert
Partner - Champion III
Partner - Champion III

Elim,

in your simplified data model you could just count the number of Customer_name. On condition that Customer_name is never NULL. Like in:

=Count(Customer_name)

Best,

Peter

[Edit] replaced Sales_name with Customer_name. We're looking at Table A.

sunny_talwar

‌I see what you mean. But i thought that was the requirement, unless I have mis-read the issue. I am on a phone device which makes things little more complicated.  

Peter_Cammaert
Partner - Champion III
Partner - Champion III

Sorry Sunny, ignore the email. I adjusted my response. I may have misread your post.

sunny_talwar

‌Peter you don't have to apologize. I have learned so many things from you and you pointing out that something Isn't right is always a chance to learn something new from the discussion. I hope to continue learning from you and other experts, even if it comes at the cost of making mistakes   .

Peter_Cammaert
Partner - Champion III
Partner - Champion III

Thanks Sunny.

Nevertheless, I'll be more careful next time