Getting Data using a condition for "Warranty Start Date" Field | Community
Skip to main content

Getting Data using a condition for "Warranty Start Date" Field

  • June 14, 2023
  • 1 reply
  • 0 views

André11

Hey everyone, 

I wanted to ask if this is possible within Explore and need a bit of help in doing this.

We offer a 5-year warranty where the first 2 years are defined as "Normal Warranty" & the final 3 as "Extended Warranty" 

This would only apply to tickets where the "Warranty Status" field is set to "In-warranty"

I want to create a split between our data using a condition like this: 

  • IF "Warranty status" = "In-warranty" 
  • IF "Warranty Date" > Over 2 years 
  • THEN = Extended Warranty 
  • ELSE IF = Normal Warranty

 

Is this possible to do with Explore? Is it possible to create a time based condition where it checked the Warranty Date & if it's 2 years (730 days) above the date in this field, then it's defined as Extended Warranty. 

 

Thank you in advance

1 reply

Zsa
  • July 24, 2023

Hi André,

This seems possible through a custom standard calculated attribute: 

IF [Warranty status] = "In-warranty" AND (DATE_DIFF(NOW(),[date field - Date],"nb_of_days")>730) THEN "Extended Warranty"
ELIF [Warranty status] = "In-warranty" AND (DATE_DIFF(NOW(),[date field - Date],"nb_of_days")<=730) THEN "Normal Warranty"
ELSE "N/A"
ENDIF

Reference: Explore functions reference