Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
HI All,
I am getting Duplicate Items are coming for some Invoice Numbers , how to correct getting a unique invoice Number ?
Thanks,
Helen
Try DISTINCT keyword, like:
LOAD Distinct * From <> ;
OR,
Use EXISTS() function like:
Load
Invoice, A, B
From <> Where Exists(Invoice) ;
If only you are extracting the invoice numbers then use Distinct function for unique invoice number.
Hi helen,
In script make you filed name as like below reload and check
(DISTINCT [Invoice]) as Invovice
let me know any changes
Count distinct "Count( Distinct <Field Name>)" is an expensive expresssion in Qlikview. Whenever used, it turns Qlikview to use single core instead of multi-cores resulting in slow performance of the app.
By making a small change in data model we can replace COUNT DISSTINCT with SUM function and improve the app performance marginally and increase app response time to users actions.
To achive this add another field in Qlikview table having value 1 along with the field you need to count.
Example:
Bookings:
LOAD
[Member Id],
[Booked Date],
[Transaction Id],
[Booking Amount]
FROM Bookings.qvd (qvd);
"Member Count":
LOAD
[Member Id],
1 AS "Unique Members"
Resident Bookings;
To count distinct members
COUNT(DISTINCT [Member Id]) can be replaced with SUM([Unique Members]).
Sunil,
Probably, it's no more single threaded/cored, please have a look here: http://community.qlik.com/blogs/qlikviewdesignblog/2013/10/22/a-myth-about-countdistinct
Hoping it is similar at script as well.