Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
c_pannese
Partner - Creator
Partner - Creator

counter for Above

hi,

 

i have a table like this:

 

qlik2.png

i suppose to use a progressive number (like the last column) to using the Above function. The Above function should restart when Cod. Articolo change. I'm unable to create the couter

Thank you all!!

 

Labels (4)
1 Solution

Accepted Solutions
rubenmarin

Hi, you can try with:

If(Above(TOTAL [Cod. Articolo])=[Cod. Articolo], Above(TOTAL [Counter])+1, 1)

Set Counter as the label of the expression...or change the name of the label and the expression to the same name.

View solution in original post

9 Replies
rubenmarin

Hi, you can try with:

If(Above(TOTAL [Cod. Articolo])=[Cod. Articolo], Above(TOTAL [Counter])+1, 1)

Set Counter as the label of the expression...or change the name of the label and the expression to the same name.

c_pannese
Partner - Creator
Partner - Creator
Author

it doesn't work correctly.. It shows the null values in the other columns and doesn't work when no Article are selected.

Thank you

c_pannese
Partner - Creator
Partner - Creator
Author

Using your help i'm trying to using directly this measure without passing the "Counter":

If(Above(TOTAL [Cod.Artcolo])=[Cod.Articolo],
above(total (today()-1+ceil(Column(3))))+ceil(Column(3)),
today()-1+ceil(Column(3)))

but it doesn't work  too.

rubenmarin

I will need a sample to test what you are saying about "null values in the other columns" and about "no Article are selected".

Sample attached, it seems to work in there.

c_pannese
Partner - Creator
Partner - Creator
Author

qlik3.png

the condition is "if (column(1)>0,..."

Without the condition it shows all the zero values.

The column "test " is 

 

if(COlumn(1)>0,
If(Above(TOTAL [Cod.Articolo])=[Cod.Articolo],
above(total (today()-1+ceil(Column(3))))+ceil(Column(3)),
today()-1+ceil(Column(3))))

but doesn't work.

Thanks

 

rubenmarin

Hi, Are you using this same expression? In your expression you are using today() and ceil(colum(3)), Are you asking about a different expression? why test expression matters?

Your initial post asks about an incremental counter when Cod. articolo is the same than above, and the expression I proposed was:

If(Above(TOTAL [Cod. Articolo])=[Cod. Articolo], Above(TOTAL [Counter])+1, 1)

Which I tested, also with nulls and a dimension before, and works (sample attached) maybe you need to use [Cod.Articolo] instead of [Cod. Articolo]?

If it doesn't works I will need a real sample (not just a capture) to check why isn't working. It can be done with inline data to not share all the app.

Regards

c_pannese
Partner - Creator
Partner - Creator
Author

Initially i supposed to use the counter but after your post i've tried the counter and,using the same logic, another formula.

Actually i understood chat i nerd the second formula with column(3).

I hope if the couter works the other formula works too , but in my table the counter doesn't work correctly.

Maybe i should write a New post..

rubenmarin

As you wish about opening a new post.

If you can upload a sample that shows the issue and why the counter doesn't works I can take look, so far I don't know why is working because in my sample works and I can't imagine why it's showing nulls in yours. 

c_pannese
Partner - Creator
Partner - Creator
Author

I had to chance the strutture of my table and now works!

Thank you!