Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Need to add max date in expression

Hi,

I am trying to write an expression for a chart that will show the total number of work orders for a specific department.  I also need to provide this by the max OPEN_DATE.  Basically I need to show the most recent data.

I’ve got this so far:

sum({<[Department]={'Development Services'}, [Work Order Status]={'Pending','Overdue'}>} COUNT_TICKETS)

But I’m unclear on how to incorporate the max OPEN_DATE in to my expression. 

Any help or guidance would be greatly appreciated.

1 Solution

Accepted Solutions
its_anandrjs

Try and write like

sum({<[Department]={'Development Services'}, [Work Order Status]={'Pending','Overdue'},

OPEN_DATE = {'$(=Max( OPEN_DATE ))'} >}COUNT_TICKETS)


Regards

Anand

View solution in original post

4 Replies
its_anandrjs

Try and write like

sum({<[Department]={'Development Services'}, [Work Order Status]={'Pending','Overdue'},

OPEN_DATE = {'$(=Max( OPEN_DATE ))'} >}COUNT_TICKETS)


Regards

Anand

anbu1984
Master III
Master III

Use Date format of OPEN_DATE in this expression


sum({<[Department]={'Development Services'}, [Work Order Status]={'Pending','Overdue'}, OPEN_DATE = {'$(=Date(Max( OPEN_DATE )),'MM/DD/YYYY')'}>} COUNT_TICKETS)

ashfaq_haseeb
Champion III
Champion III

Hi,

add this to your code.

OPEN_DATE = {"$(=Max( OPEN_DATE ))"}

Try like this

sum({<[Department]={'Development Services'}, [Work Order Status]={'Pending','Overdue'},

OPEN_DATE = {"$(=Max( OPEN_DATE ))"} >}COUNT_TICKETS)

Regards

ASHFAQ

Not applicable
Author

Thanks you for your response - this worked!