Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
punitpopli
Specialist
Specialist

Count of rows in script post left join?

Hi Experts,

Could you please let me know if we can extract the count of a table in a variable post left join?

details in below :

A:

Load

     *

From [QVD_A]qvd;

Left Join

B:

Load

     *

From [QVD_B]qvd;

//Count after the b joining A,

I tried Let vVarA = noOfRows(A);

TRACE $(A); but this is not working

Left Join

C:

Load

     *

From [QVD_C]qvd;

//Count after the C joining A..

Left Join

😧

Load

     *

From [QVD_D]qvd;

//Will get final Count of all the tables once reload finish.

1 Solution

Accepted Solutions
vardhancse
Specialist III
Specialist III

Hi,

can change the variable as below:

Let vVarA = NoOfRows('Tablename');

** please note '' is missing in your table name

now if we use the variable in front end then we can get the total count

=$(vVarA)


Please note if we do left join, then only the related information from Table A will be loaded from rest of the tables.


And since we are concatenating with multiple tables the count in variable will reflect total rows from all the tables

View solution in original post

6 Replies
vardhancse
Specialist III
Specialist III

Hi,

can change the variable as below:

Let vVarA = NoOfRows('Tablename');

** please note '' is missing in your table name

now if we use the variable in front end then we can get the total count

=$(vVarA)


Please note if we do left join, then only the related information from Table A will be loaded from rest of the tables.


And since we are concatenating with multiple tables the count in variable will reflect total rows from all the tables

jonathandienst
Partner - Champion III
Partner - Champion III

The table name needs quotes

...NoOfRows('A')

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
prasad_dumbre
Partner - Creator
Partner - Creator

Hi Punit, Post your join logic, take a resident of table create a metadata table. Example: LOAD 'A'            as TableName, NoOfRows('A')  as TableRows Resident 'A'; Depending on your requirement you can use this table as it is or pull info from it & store it in variable.

punitpopli
Specialist
Specialist
Author

Hi vardhancse

Tried with both single qoute an double quote but this is not working.

This worked Thank you

punitpopli
Specialist
Specialist
Author

Hi jontydkpi

Tried with both single qoute an double quote in table name, but is not working for me.

This worked Thank you

vardhancse
Specialist III
Specialist III

Good that you were able to get the solution.

Please mark is as correct answer so that it might be helpful to others