Skip to main content
Announcements
Accelerate Your Success: Fuel your data and AI journey with the right services, delivered by our experts. Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
Sam_Thomas
Creator
Creator

Return KPI value for count of values AFTER a specific date

Hi

I'm not sure why this is so complicated but I cannot seem to do it. 

I simply want to add a KPI to my dashboard to return the count of values for the last 30 days. 

I have Work Order Data (Maintenance Jobs), containing a work order number, a raised date and a completed date. 

I want to be able to show how many work order have been raised in the last month/30 days. 

What expression can I use?

Thanks in advance. 

1 Solution

Accepted Solutions
GaryGiles
Specialist
Specialist

Try this:

Count({$<[Raised Date]={"<=$(=Date(Today()))>=$(=Date(Today()-30))"}>} [Work Order Number])

View solution in original post

5 Replies
GaryGiles
Specialist
Specialist

Try this:

Count({$<[Raised Date]={"<=$(=Date(Today()))>=$(=Date(Today()-30))"}>} [Work Order Number])

Sam_Thomas
Creator
Creator
Author

I noticed a rogue ']' in the expression, removed it and it works perfectly. 

Absolutely brilliant, thanks so much, GaryGiles. 

Sam_Thomas
Creator
Creator
Author

If you can spare the time, would you be able to inform me of how I may go about adding an IF statement to that expression.

Where I could only return work orders that have been completed. Based on a 'COMPLETION CODE' field value being not null?

GaryGiles
Specialist
Specialist

Something like this:

Count({$<[Raised Date]={"<=$(=Date(Today()))>=$(=Date(Today()-30))"}>} ) if(isnull([COMPLETION CODE]),[Work Order Number]))

Sam_Thomas
Creator
Creator
Author

Wow that's great, thank you. Works perfectly (with the omitting of the closed bracket before the IF statement.)

👍