Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
chriscools
Creator II
Creator II

count , but only orders older then 30 days

Hello,

i have a count in a textfield of a table where i want to count all the orders in a certain orderstatus (on hold).

in the table i'm showing every order in that status, but i would like to only count those where the date of creation (=OrderDate) is more than 30 days ago.

how would i need to adapt this formula to only count me the orders that exist already more than 30 days?

thanx!

chris

count ( DISTINCT if ( OrderStatus= 'On hold', OrderNumber) )

3 Replies
sujeetsingh
Master III
Master III

Hi,

You can use this expression--

count ( DISTINCT if ( OrderStatus= 'On hold' and OrderDate>=30, OrderNumber) )

And if your Order date is DateField then try this

count ( DISTINCT if ( OrderStatus= 'On hold' and Interval(Today-OrderDate,'dd')>=30, OrderNumber) )


Hope this help you..

Not applicable

U can write a expression below

=count ( DISTINCT if ( OrderStatus= 'On hold' and OrderDate<=Today()-30, OrderNumber) )

Regards,

Kabilan K.

nirav_bhimani
Partner - Specialist
Partner - Specialist

HI,

Try this

Generally If stm work slow so try to avoid that.

Count (Distinct { 1 <OrderStatus= { 'On hold' } , "OrderDate<= Today()-30 ">} OrderNumber)

Regards,

Nirav Bhimani