Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Jens
Contributor II
Contributor II

QliKView Distinct LOAD does not working..

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.

Labels (3)
1 Solution

Accepted Solutions
MarcoWedel

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

 

View solution in original post

3 Replies
Taoufiq_Zarra

@Jens 

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

Regards,
Taoufiq ZARRA

"Please LIKE posts and "Accept as Solution" if the provided solution is helpful "

(you can mark up to 3 "solutions") 😉
anat
Master
Master

can you share some data ,how data looks in QVD?

MarcoWedel

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