Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I fetched records to a table-box. I don't know which field is the primary key.Now I want to find the no. of records fetched.
How can I do this?
Hi,
If you click on top of Table box it will show you total rows at bottom . If you want to show the number of rows fetched then you can use function RowNo() as Rows in your extract and show it in tablebox.
Load
*,
RowNo() as Row
From table.qvd;
Hope this will help.
Vijay
Hi,
You can make a "primary key" for this purpose if you know which of the fields make the results unique:
Count(Distinct Field1 & Field2 & Field3)
Regards,
Stephen
Use a variable
Let Rows=NoofRows(TableName);
$(Rows) will give you the no of records in the table.
Hi,
NoofRows(TableName) is a script function.
NoofRows() is a chart function so won't work in a table box.
Regards,
Stephen
Try using Recno() in the script.
You can add a field "ROW_COUNT" with the value 1 in your table and sum(ROW_COUNT). More efficient than count(distinct ...) and you don't need to build a key on the fly. Moreover it can be dynamic with selections in application.
Hi,
I'm new to Qlikview. Please tell me how to add a field in an already existing table-box with data.
I tried adding an inline table to the script with LOAD * INLINE[row_count];
However when I add this to the table-box, the table-box does not show any value.
Thanks,
Hi,
If you click on top of Table box it will show you total rows at bottom . If you want to show the number of rows fetched then you can use function RowNo() as Rows in your extract and show it in tablebox.
Load
*,
RowNo() as Row
From table.qvd;
Hope this will help.
Vijay
Thank you all,
I got the solution by adding Rowno() function as suggested by Vijay