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

Announcements
Discover how organizations are unlocking new revenue streams: Watch here
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Qlikview - count repeated data

Hi all,

I need to count repeated data from my excel file using qlikview. I have next table enter image description here

Format od date (DD-MM-YY)

I need to count Item that repeated in table but item that is repeated day after day in a row.

When i use

count(Item) 

i got next table

enter image description here

but I don't wont this i want table like this:

enter image description here

because Item I1 repeat in date 01-05-17 and then in date 02-05-17, i don't need item I2 because don't repeat day after day.

I try also

=avg( aggr( count([Item) ,Date) )

Any idea???

11 Replies
MindaugasBacius
Partner - Specialist III
Partner - Specialist III

tmp:

LOAD Location,

     Item,

     Result,

     Date

FROM

(ooxml, embedded labels, table is Sheet1);

NoConcatenate

tmp1:

LOAD *

Resident tmp

Order By Item asc, Date desc;

DROP Table tmp;

NoConcatenate

tmp:

LOAD *

  ,If(Item = Peek(Item) and Peek(Date) - 1 = Date, 1, 0) as Flag_tmp

Resident tmp1;

DROP Table tmp1;

NoConcatenate

tmp1:

LOAD *

Resident tmp

Order By Item asc, Date asc;

DROP Table tmp;


NoConcatenate

tmp:

LOAD Location,

     Item,

     Result,

     Date

  ,If(Item = Peek(Item) and Peek(Date) + 1 = Date, If(Flag_tmp = 0, 1, 0), 0) + Flag_tmp as Flag

Resident tmp1;

DROP Table tmp1;

Anonymous
Not applicable
Author

it works, thanks