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: 
brunolelli87
Creator II
Creator II

Show a regressive count on chart/table

Dears,

I'm using the following expression to count the number of VDAA between two dates:

=count({<PERI={">=$(=addyears(FirstSortedValue(TOTAL PERI, LOPP), -1))<=$(=max(PERI))"}>} VDAA)


But this expression is working perfectly just in case of using it on a TextField.
When using it on a chart or table I'm getting numbers os 1 and 0, and basically the system is summing the values...

Check the pictures below:
As you can see below, at the column TESTE I'm getting values of 1 or 0 (you can't see it, sorry... )
Teste 3.png

But, I would like to get values as you can see below:

Teste 4.png

 

What should I do?
Thank you so much!

1 Solution

Accepted Solutions
Taoufiq_Zarra

if I understand correctly.

and since PERI is a date +1 (sequence)

maye be :

=count({<PERI={">=$(=addyears(FirstSortedValue(TOTAL PERI, LOPP), -1))<=$(=max(PERI))"}>} total VDAA)-rowno()+1

 

output :

Capture.PNG

Regards,
Taoufiq ZARRA

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

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

View solution in original post

4 Replies
brunolelli87
Creator II
Creator II
Author

Any suggestion people?

Taoufiq_Zarra

can you share a sample data or qvw file ?

I'm not sure if I understood correctly the goal

Regards,
Taoufiq ZARRA

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

(you can mark up to 3 "solutions") 😉
brunolelli87
Creator II
Creator II
Author

Yes...

Take a look at my project!

As you can see on my project, the column TESTE is showing 1 or 0, but I would like to show the how many PERI we have from that day and =addyears(FirstSortedValue(PERI, LOPP), -1)...

In other words, I would like to show the number of items in column PERI between the PERI's Date and the expression =addyears(FirstSortedValue(PERI, LOPP), -1)

So, I'm expecting something like this:
Teste 4.png

Could you please help me providing the expression or script?
Once I'm using a Personal Edition I can not open your file...

Thanks

Taoufiq_Zarra

if I understand correctly.

and since PERI is a date +1 (sequence)

maye be :

=count({<PERI={">=$(=addyears(FirstSortedValue(TOTAL PERI, LOPP), -1))<=$(=max(PERI))"}>} total VDAA)-rowno()+1

 

output :

Capture.PNG

Regards,
Taoufiq ZARRA

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

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