Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

counting documents with if criteria

Hi,

i despair of this... i'm trying to count Documents with a if-condition in a Text-Field. in a table i also created i set a boolean 1, if date one is higher then date today(). (just to check if my text-field counting works)  The Dimension of this table are the document numbers.

in the textfield i'm unable to run the same expression

if(today()>=max([Bestellungen.Date of Shipment])+45,1,0)

i need the max() statement, because every document contains a few [Date of Shipment] - Dates and i only need the highest.

i hope you can understand what my problem is, thank you for your help!

Best,

Tim

3 Replies
Not applicable
Author

Hi,

Could you please upload the sample file?

Not applicable
Author

Hi,

here is the sample file!

thank you!

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

If you want to do the count in the dimensionless textbox, you need to use aggr() to tell QV what to iterate over. So reusing your working expression from the chart.

=sum(aggr(if(max([max. Verschiffung])+45<= today(),1,0),[Bestellungen.Document No_]))

Or simplifying it a bit:

=sum(

  aggr(

    -max([max. Verschiffung])+45<= today()

  ,[Bestellungen.Document No_])

)

-Rob