Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Chanty4u
MVP
MVP

RE:after-before

Hi all,

I want to know  the status of the document?

it means

how to know? 

1)the data after_reload  ?

2)the data before_reload?

3)no. of rows?

4)no.of columns?

thanks in advance:

22 Replies
tamilarasu
Champion
Champion

Hi Chanty,

You can use below formulas in text box (Front end).

='No of Rows ' & sum($Rows)

='No of Fields ' & sum($Fields)

Chanty4u
MVP
MVP
Author

hi jagan,

i hve used this in text object

Is this correct syntax?

='Time needed for reload: ' & date([after_reload]-[before_reload],'mm:ss') & chr(10)&chr(10)&

'Rows:' & count(DISTINCT Identifier) & chr(10) & 'Columns: 11' 

Chanty4u
MVP
MVP
Author

it is only for rows nd fileds?

for table  i need to see no.of rows nd columns?

Gysbert_Wassenaar

Everytime you load data you will have to create a file (at the end of the script so all your real data is loaded) in which you store how many records your tables contain at the end of that run. During the next reload you can load this data again and at the end add the new record counts again to that file. Using the data from this file you can compare between one reload and any previous reload.

Something like this should get you started:

For i = 0 to NoOfTables()-1

  LET vTableName = TableName($(i));

  For j = 1 To NoOfFields('$(vTableName)')

  LET vFieldName = FieldName($(j),'$(vTableName)');

  TableStats:

  LOAD

     '$(vTableName)' as TableName,

     NoOfRows('$(vTableName)') as RowCount,

     NoOfFields('$(vTableName)') as FieldCount,

     '$(vFieldName)' as FieldName,

     FieldValueCount('$(vFieldName)') as FieldValueCount

  AUTOGENERATE 1

  ;

  Next

Next

STORE TableStats INTO TableStats.qvd (qvd);


talk is cheap, supply exceeds demand
Chanty4u
MVP
MVP
Author

tq  gysbert.

but evry time i need to do this? 

jagan
Luminary Alumni
Luminary Alumni

Yes Correct.  You can also use like this. If you have multiple tables then you can create a table using autogenerate and insert the records with this variables.

Regards,

Jagan.

Chanty4u
MVP
MVP
Author

wen i use the abve code in text object shwng below

reload.png

Gysbert_Wassenaar

Yes, everytime you reload. Because during a reload all data is discarded first and then new data is loaded. Qlikview does not keep track itself of (meta)data of previous loads.


talk is cheap, supply exceeds demand
Chanty4u
MVP
MVP
Author

thanks for great explanation.

tamilarasu
Champion
Champion

You can create a chart like below.

Capture.PNG

Dimension:

$Table

Expressions:

=Sum($Rows)

=Sum($Fields)


If you want the data count "before reload", you need to store the data count somewhere (in a variable or text file). While reload, you can retrieve and store in a new variable again.