Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
deeavhad
Contributor
Contributor

How to exclude negative date difference

my Expression is below which is showing error

Avg({<[Docs Pending Status]-={'Declined / Rejected / Withdrawn'}>}{<[Talent Segment]-={'*Tupe*'}>}{<[Hiring Date]-={" "},[Hiring Date] - [Created_SP]={"<0"}>}
if(([Hiring Date] - [Created_SP])>90,90,[Hiring Date] - [Created_SP]))

 

By using this expression I want to remove negative values of [Hiring Date] - [Created_SP] these 2 dates difference

 

Please guidee

Labels (1)
1 Reply
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

You have a number of syntax problems there. I believe the correct expression would look like:

=Avg(
  {<
    [Docs Pending Status]-={'Declined / Rejected / Withdrawn'}
    ,
[Talent Segment]-={"*Tupe*"}
    ,
[Hiring Date]-={' '}
    ,ID={
"=[Hiring Date] >= [Created_SP]"}
  >}
  RangeMin(
[Hiring Date] - [Created_SP], 90)
) 

Replace "ID" with a primary identifier fieldname from your data, like EmployeeId.

-Rob
http://www.easyqlik.com
http://masterssummit.com
http://qlikviewcookbook.com