Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I have a requirement in Qlikview where I need to display the total quarter wise. My approach was to create quarter wise data from the main table (i.e. create separate table for each quarter) and then calculating the total, after which combining the separate quarter tables into a single table. While doing this, qlikview throws an error since my last two quarters data is unavailable and hence the table is empty. Is there any way to check whether table contains data while loading it?
you can add a rowno() to the loading table and then check if this is higher than one
Table
load:
field1,
field2,
rowno() as Rowno
from data
if max(Rowno)>= 1 then
whatever goes here
end if
Are you trying to check a external file (like a Excel file) to see if it exists or not? or is it during a resident load?
External file can be checked like this:
Set vFile = 'Data\XYZ.qvd'; //Path of the file where you have to check
Let vFileExist = If(FileSize(vFile) > 0, -1, 0); /* Checking if the file exist in the directory. */
IF $(vFileExist) then
....
ENDIF
I hope this helps.
Best,
Sunny
you can add a rowno() to the loading table and then check if this is higher than one
Table
load:
field1,
field2,
rowno() as Rowno
from data
if max(Rowno)>= 1 then
whatever goes here
end if
if(NoofRows('Table1')>0)then
//Load
//Resident table1;
Endif
This condition works.
Thanks everyone for you help
Thanks!