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: 
nroy12
Contributor II
Contributor II

qlik expression

Hi All,

Kindly suggest me whats wrong with this statement?

i am getting invalid statement.

=min(If(Match(task_name,'Upload Content') and Match(workflow_name,'EMEA Content Upload and perform QC'),date(task_creation_date), '31/12/2025'))

thanks,

 

Labels (5)
1 Solution

Accepted Solutions
vinieme12
Champion III
Champion III

  • Are the field names correct?
  • Even if it says error in expression What happens if you just click "Apply
  • Can you post a screenshot of the Edit Expression window

Even below will return same result

=If(Match(task_name,'Upload Content') and Match(workflow_name,'EMEA Content Upload and perform QC')
,min(date(Date)), makedate(2025,12,31))

 

or

=if(

min({<task_name={'Upload Content'},workflow_name={'EMEA Content Upload and perform QC'}>}task_creation_date

,min({<task_name={'Upload Content'},workflow_name={'EMEA Content Upload and perform QC'}>}task_creation_date)

,makedate(2025,12,31) )

 

 

 

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.

View solution in original post

8 Replies
Or
MVP
MVP

There does not appear to be anything wrong with this statement. It parses correctly in Data Load Editor.

durgesh22
Creator
Creator

@nroy12 

Above statement is valid, but make sure the FIELDS you are using in this expression are correct.

nroy12
Contributor II
Contributor II
Author

yes but when i add the min function its giving me invalid in the report expression, otherwise wihtout min its working fine. i got 3 lines of dates. wanted to take min of these dates.

Or
MVP
MVP

Your issue is probably with using a string within the min() function. Try using a date instead of the string in the Else section.

durgesh22
Creator
Creator

Can you help with few lines of dummy data , it will help others is giving solution to your problem.

nroy12
Contributor II
Contributor II
Author

i tried instead of string following:

=min(If(Match(task_name,'Upload Content') and Match(workflow_name,'EMEA Content Upload and perform QC'),date(task_creation_date), makedate(2025,12,31)))

 

still its saying invalid statement

 

vinieme12
Champion III
Champion III

  • Are the field names correct?
  • Even if it says error in expression What happens if you just click "Apply
  • Can you post a screenshot of the Edit Expression window

Even below will return same result

=If(Match(task_name,'Upload Content') and Match(workflow_name,'EMEA Content Upload and perform QC')
,min(date(Date)), makedate(2025,12,31))

 

or

=if(

min({<task_name={'Upload Content'},workflow_name={'EMEA Content Upload and perform QC'}>}task_creation_date

,min({<task_name={'Upload Content'},workflow_name={'EMEA Content Upload and perform QC'}>}task_creation_date)

,makedate(2025,12,31) )

 

 

 

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
nroy12
Contributor II
Contributor II
Author

thanks its working correctly with my statement but i had to put this expression in the measure instead of dimension. but i have achieve result like following:

here the left side  less than 3 days , 3-5 days this grouping is the dimension i wanted to count by  above duration expression.

actual result i am getting now:

nroy12_1-1651582531784.png

 

expected result:

nroy12_0-1651582373642.png

thanks,