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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Count

weekyearweek
20140520140105
20140620140106
20140620140206
20140720140207
20140820140208
20140920140209

How to find out count of those Yearweek which come twice as per week.. in script ?

In this example 20140106 and 20140206 comes 2 time in 201406 week..

so how to write code in script.

1 Solution

Accepted Solutions
maxgro
MVP
MVP

RESULT

1.jpg

SCRIPT

source:

load * inline [

week, yearweek

201405, 20140105

201406, 20140106

201406, 20140206

201407, 20140207

201408, 20140208

201409, 20140209

];

load

  week, if(count(distinct yearweek)>1, 1, 0) as flagmorethanoncexweek

Resident source

group by week;

View solution in original post

1 Reply
maxgro
MVP
MVP

RESULT

1.jpg

SCRIPT

source:

load * inline [

week, yearweek

201405, 20140105

201406, 20140106

201406, 20140206

201407, 20140207

201408, 20140208

201409, 20140209

];

load

  week, if(count(distinct yearweek)>1, 1, 0) as flagmorethanoncexweek

Resident source

group by week;