Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Maddineni_S
Contributor III
Contributor III

count of weeks in iterative sequence

 

Can some one help me to get the desired output. 

when i select particular week. i should get the count of that week numbers and less than that week number. below is data Week_no is input data & output column is expected output. 

 
 
Week_no Output
1 2
1
2 3
3 4
4 5
5 7
5
6 8
7 9
8 10
9 11
10 13
10
Labels (1)
1 Reply
Taoufiq_Zarra

@Maddineni_S  Many solutions

for example in script :

DATA:

LOAD * INLINE [
    Week_no 
    1 
    1
    2 
    3 
    4 
    5 
    5
    6 
    7 
    8 
    9 
    10 
    10
];

output:
noconcatenate

load Week_no,RangeSum(1,Peek(output)) as output resident DATA  order by Week_no;


drop table DATA;

 

and then in interface

dimension:  Week_no

measure : =Max(output)

output:

Taoufiq_Zarra_0-1672134376100.png

 

Regards,
Taoufiq ZARRA

"Please LIKE posts and "Accept as Solution" if the provided solution is helpful "

(you can mark up to 3 "solutions") 😉