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

Announcements
Posting on Qlik Community is temporarily paused for some users. Thank you for patience and we'll update you soon!
cancel
Showing results for 
Search instead for 
Did you mean: 
chiru_thota
Specialist
Specialist

Can we create a expression with counter ?

Hi all,

Can I get the below expression as highlighted in red.

Basically I am trying to start my counter at 1 and continue till I see null.....same thing repeats but it should from 1 again continue (1,2,3...).

Is this possible some how ?

Counter.jpg

Labels (1)
1 Solution

Accepted Solutions
jonathandienst
Partner - Champion III
Partner - Champion III

Hi

Counter:

=If(IsNull(Above([Value])), 1, Above([Counter]) + 1)

or

=If(IsNull([Value]), null(), If(IsNull(Above([Value])), 1, Above([Counter]) + 1))

HTH

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein

View solution in original post

3 Replies
chiru_thota
Specialist
Specialist
Author

Any Ideas ?

jonathandienst
Partner - Champion III
Partner - Champion III

Hi

Counter:

=If(IsNull(Above([Value])), 1, Above([Counter]) + 1)

or

=If(IsNull([Value]), null(), If(IsNull(Above([Value])), 1, Above([Counter]) + 1))

HTH

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
chiru_thota
Specialist
Specialist
Author

Thanks Jonathan.

You are real guru!

Thanks,

Chiru