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

Variable creation

I wrote script to create the tables and the relationship, but i cannot figure out how to create a variable and assign to it the number of rows of a specific table.

I need this when creating a percentage graph.

3 Replies
swuehl
MVP
MVP

Are you looking for something like this?

TABLE:

LOAD * INLINE [

Test

A

B

B

C

C

C

];

LET vNumRows = NoOfRows( 'TABLE' );

Not applicable
Author

ok i did all this and created vNumRows in settings => variable overview.

but when i want to show this in a text object, it appears as NoOfRows( 'TABLE' )  not a number

how can i fix this???

Thanx  for the reply

jonathandienst
Partner - Champion III
Partner - Champion III

Hi

That form of NoOfRows is only usable during script. If you want to display it in the front end, use Stefan's script to create a variable, and then display the variable value. Put

=vNumRows

in a text box.

Regards

Jonathan

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