Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

records getting dropped from qvd

i have a qvd in which records are present but when am trying to use that qvd for some calculations,records are getting dropped,what cud be the possible reson.

9 Replies
swuehl
MVP
MVP

Please post some sample lines of records and what kind of calculations you are performing.

There are multiple places where records can get filtered, e.g. in a WHERE clause when loading the records from QVD or using a condition in your expression, or using selections in your field values.

Anonymous
Not applicable
Author

Values are there in a qvd but when calculation is happng some values are getng dropped

swuehl
MVP
MVP

Please post a small sample QVW and the QVD that demonstrates your issue.

Or at least with a detailed description of your calculations (in the script? in the front end?) and your data model.

It's almost impossible to help you with more than wild guesses with the information provided so far.

Anonymous
Not applicable
Author

one of the field is calculated based on today's date -yesterday's date

its wrkng fine for all the date except for the 1st of the month and the code in the script is like:

where date(datefield) >= makedate(2016,12,31) and date(datefield) <=makedate(2017,3,31)

Anonymous
Not applicable
Author

LET vMinCalendarDate = Floor(MakeDate(2016,1,1));

LET vMaxCalendarDate = Floor(MakeDate(2016,3,31));

LOAD

Date($(vMinCalendarDate)+RowNo()-1) as [datefield]

AutoGenerate $(vMaxCalendarDate)-$(vMinCalendarDate)+1;

what is the meaning of these lines of code?

Anil_Babu_Samineni

Hope this helps

It will consider as MinDate 01-01-2016 and MaxDate 31-03-2016

First will fetch only two date values. But, When you use RowNo() it will fetch all records where between 01-01-2016 to 31-03-2016 because you are using Autogenerate for values

And, The same way we can achieve by using below. Better it may understand you

LET vMinCalendarDate = Floor(MakeDate(2016,1,1));

LET vMaxCalendarDate = Floor(MakeDate(2016,3,31));

LOAD

Date($(vMinCalendarDate)+IterNo()-1) as [datefield]

AutoGenerate 1

While ($(vMinCalendarDate)+RowNo()-1) < $(vMaxCalendarDate);

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
senpradip007
Specialist III
Specialist III

LET vMinCalendarDate = Floor(MakeDate(2016,1,1));

LET vMaxCalendarDate = Floor(MakeDate(2016,3,31));

Here two variables, vMinCalendarDate (42370) and vMaxCalendarDate (42460) contain minimum and maximum numbers respectively.


LOAD

Date($(vMinCalendarDate)+RowNo()-1) as [datefield]

AutoGenerate $(vMaxCalendarDate)-$(vMinCalendarDate)+1;

The above load statement creates dates having 91 different days. AutoGenerate function generates number of rows given as iteration figure. Here $(vMaxCalendarDate)-$(vMinCalendarDate)+1 returns 91.


Date($(vMinCalendarDate)+RowNo()-1)  expressions evaluates like below


Date(42370+RowNo()-1) where RowNo() iterates 1, 2, 3,....,91.


Hope it will help.

Anonymous
Not applicable
Author

so if i need to change the date to 31/12/2015 ,what changes i need to do in my code

senpradip007
Specialist III
Specialist III

Try like

LET vMinCalendarDate = Floor(MakeDate(2015,12,31));