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: 
Not applicable

When will a registry be considered as distinct?

Hello!

If I have a table Test with the following:

AccountDateInitialPriceSequence
00105/05/2012X503
00210/10/2012Y355
00107/03/2013Z121
00210/10/2012Y355

And then I do:

LOAD Distinct Account, Date, Initial, Price, Sequence FROM Test

Would that LOAD show me only the registries that have ALL distinct fields? (Rows: 1, 2 and 3)

Because the 4 rows are for Account 001 and 002 but row #2 is equal to row #4.

But if I do: LOAD Distinct Account it'd only show me Accounts 001 and 002?

Thank you!

1 Solution

Accepted Solutions
SergeyMak
Partner Ambassador
Partner Ambassador

Hi Mart,

If you do LOAD Distinct Account, Date, Initial, Price, Sequence FROM Test you will get three lines.

AccountDateInitialPriceSequence
00105/05/2012X503
00210/10/2012Y355
00107/03/2013Z121

But if you do only

LOAD Distinct Account FROM Test you will get

Account
001
002

Regards,

Sergey

Regards,
Sergey

View solution in original post

2 Replies
SergeyMak
Partner Ambassador
Partner Ambassador

Hi Mart,

If you do LOAD Distinct Account, Date, Initial, Price, Sequence FROM Test you will get three lines.

AccountDateInitialPriceSequence
00105/05/2012X503
00210/10/2012Y355
00107/03/2013Z121

But if you do only

LOAD Distinct Account FROM Test you will get

Account
001
002

Regards,

Sergey

Regards,
Sergey
jagan
Luminary Alumni
Luminary Alumni

Hi,

In Load statement if you use only Account field with Distinct then it load only 001 and 002 two values.

But if you use

Test:

LOAD Distinct Account, Date, Initial, Price, Sequence FROM Test;


Then it should load only two rows, but you are getting 4 rows, export this rows to excel and check whether there are any white spaces in the values of the fields.


Or you can try like this


LOAD Distinct Date FROM Test;  -- If you get more than two rows then there are some spaces or special characters in your data.


LOAD Distinct Initial FROM Test;  -- If you get more than two rows then there are some spaces or special characters in your data.


LOAD Distinct Price FROM Test;  -- If you get more than two rows then there are some spaces or special characters in your data.


LOAD Distinct Sequence FROM Test;  -- If you get more than two rows then there are some spaces or special characters in your data.


Regards,

Jagan.