Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
danimarc12
Partner - Creator
Partner - Creator

Document status (Count function)

Hello everyone!

I have an issue with a Count() expression. 

Cattura.PNG

In this image you can see a Document which has different status. Basically I want to count how many documents are in status idstep=80 but if I write Count( {< idstep={80} >} numpratica) it will display all the documents that had this status ("numpratica" is the ID of the document).

I think I have to add also the condition UltimaModifica={$=(Max(UltimaModifica))} but it doesn't work.

Maybe that's not correct as well.

Could anyone help me please?

Thank you all!

Labels (2)
5 Replies
stevejoyce
Specialist II
Specialist II

Do you want the max/last UltimaModifica for each numpratica?  or the max/last UltimaModifica for the entire data set?

I don't 100% follow with the language difference...

if it's max value for entire set:

Count( {< idstep={80}, UltimaModifica={"$(=date(Max(UltimaModifica)))"}  >} numpratica) 

if it's for each numpratica, it's:

=Count(aggr(if(date(Max(total<nupmractica> UltimaModifica))) = UltimaModifica, numpratica), numpratica, UltimaModifica))

danimarc12
Partner - Creator
Partner - Creator
Author

I want to count how many numpratica are in the status "80". I have 1.200 numpratica in different status. I want to know how many of theese are in that status.

stevejoyce
Specialist II
Specialist II

Ok, try this.

=sum(aggr(if(date(Max(total<nupmractica> UltimaModifica))) = UltimaModifica, count( {< idstep={80} >} 1)), numpratica, UltimaModifica))

danimarc12
Partner - Creator
Partner - Creator
Author

it's not correct 😞

danimarc12
Partner - Creator
Partner - Creator
Author

 

b84c1e19-17c7-4145-b9ed-cdd53bf8bd20.png

Cattura.PNG

Hi must see "2" in my KPI  Verifica Preventivo".

In the straight table I've used "FirstSortedValue" function to show "Ultimo Step".

=FirstSortedValue(NomeStep, -UltimaModifica)