Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in NYC Sept 4th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

count distinct rows in LOAD statement

Hi,

in my table there are two columns: NDG and ACCOUNT_NR

maybe

NDG ACCOUNT_NR

1 23

1 23

1 56

2 78

2 79

2 65

I want my load statement result like

NDG ACCOUNT_NR POS

1 23 1

1 56 2

2 78 1

2 79 2

2 65 3

where POS=current pos of distinct (NDG, ACCOUNT_NR) .

How can I write my load statement?

Thanks!

2 Replies
hector
Specialist
Specialist

Hi, with previous() and peek() functions, I 've made this

at least i have 100% of match with your result

See the attachment

Rgds

suniljain
Master
Master

Load Count(NDG&'-'&ACCOUNT_NR) AS COUNT_id

FROM .............