Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hey,
I'am having some trouble with qlikview right now. The distinct load does not work. I was trying different things to fix it, but nothing worked.
LOAD Distinct
FIELD1,
DATE(FIELD2)
FROM [test.qvd] (qvd);
Where is the problem? In the QVD are only the 2 Fields.
The most probable cause might be:
FIELD2 actually is a timestamp, i.e. it has a fractional time part you just don't see because you formatted it as date using the Date() function.
The time part is still there and can be seen when formatting FIELD2 as Timestamp e.g. using Timestamp(FIELD2) or by changing the number format settings.
A "Distinct" load in this case does not lead to a single date only shown once, like you expect.
Instead each distinct timestamp value will be loaded regardless of having the same date format as other timestamps.
If you want to derive real dates from your timestamps you could use DayName(FIELD2) or Date(Floor(FIELD2)) instead of just Date(FIELD2). Doing so, the Distinct load might actually meet your expectations.
hope this helps
Marco
I don't see a problem in the script unless it's a problem in the qvd path file
Can you give more details about the error
can you share some data ,how data looks in QVD?
The most probable cause might be:
FIELD2 actually is a timestamp, i.e. it has a fractional time part you just don't see because you formatted it as date using the Date() function.
The time part is still there and can be seen when formatting FIELD2 as Timestamp e.g. using Timestamp(FIELD2) or by changing the number format settings.
A "Distinct" load in this case does not lead to a single date only shown once, like you expect.
Instead each distinct timestamp value will be loaded regardless of having the same date format as other timestamps.
If you want to derive real dates from your timestamps you could use DayName(FIELD2) or Date(Floor(FIELD2)) instead of just Date(FIELD2). Doing so, the Distinct load might actually meet your expectations.
hope this helps
Marco