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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out 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
MVP
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