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: 
Not applicable

need help

Hi Viewers,

I have table contains empty records

temp1:
load
functionname,
functionid,
fun_details
from <path\.qvd>

like this I have 5 tables(temp2,temp3,temp4,temp5)

am trying to showing count of records in front end

I have tried this but didn't work

tablename(dimension)---calculated dim--->valuelist('temp1','temp2','temp3','temp4','temp5')
num of records(expression) --->Pick(Match(valuelist('temp1','temp2','temp3','temp4','temp5'),'temp1','temp2','temp3','temp4','temp5'),
count(functionid),count(),count(),count(),count()))

Ultimately my desired output should be

In straight table

dim>tablename
field values should be

temp1
temp2
temp3
temp4
temp5

exp>no of records

corresponding values should be
0
0
0
0
0

Any ideas??

6 Replies
sspe
Creator II
Creator II

Hi,

Maybe I don't quite understand your requirement, but if you just want to have a table showing the tablename and the rowcount, then you can add a table and using the systemfields $Table and $Rows as fields.

Regards

Steen

Not applicable
Author

Hi thanks for your reply!!

My desired output should be

  

tablenameno of records
temp10
temp20
temp30
temp40
temp50
MayilVahanan

hi

try like this

temp1:

load * Inline

[

functionname,  functionid, fun_details

];

temp3:

load * Inline

[

functionname3,  functionid3, fun_details3

];

temp2:

load * Inline

[

functionname2,  functionid2, fun_details2

];

FOR i = 0 to NoOfTables()-1

let vTableName = TableName($(i));

LOAD NoOfRows('$(vTableName)') as Rows, '$(vTableName)' as TableName  AutoGenerate 1;

NEXT i;

use tablename as dimension and Rows as expression and uncheck suppress zero values in presentation tab.

temp10
temp20
temp30
Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
Not applicable
Author

Re: need help

I want to show in dynamic.

Ie.,In future if there is any new are found we should display the count of records.

How to accomplish this scenario.

Please help!!

Peter_Cammaert
Partner - Champion III
Partner - Champion III

Mayilvahanan's solution will work for all tables you may load, whatever their name and whatever their field layout. If that's not enough, please tell us where you expect it to go wrong.

sspe
Creator II
Creator II

Both Mayilvahanan's solution as well as using the build-in $Tables and $Rows functions will work. If you don't agree, then I think you'll have to be let us know what it is in our suggestions that doesn't work you.

Personally I don't think it's neccessary to make a seperate routine for this becuase it's already existing functions.

Where the build in $Tables and $Rows functions doesn't work though, is in the cases where you don't want to show all tables. In that case it might be neccessary with the solution like Mayilvahanan's - but I don't see that being your requirement.

Regards

Steen