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

Announcements
Mastering Change Data Capture: Read Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to get values through expression

Hi,

I have one expression in staright table and the expression is

sum(if(DateUpdate<DueDate and not isnull(DateIssue),1,0))

Could anyone let me know how can I change above expression so that I need to get the values for MAX(DateUpdate)

Please help me.

Thanks.

7 Replies
nilesh_gangurde
Partner - Specialist
Partner - Specialist

At script level you cant take max date.

instead you can do at the Expression level in chart using set analysis.

put this in the script :

if(DateUpdate<DueDate and not isnull(DateIssue),1,0) as New_Field

and in chart expression

Sum(       {<New_Field = {1},DateUpdate = {"$(=Max(DateUpdate))"}>}   Field_Name )

-Nilesh

Not applicable
Author

Thanks and I have DateUpdate and DateIsuue in separate tables. How can I enter in script? please help me.

Not applicable
Author

and also what is Field_Name? please let me know

Not applicable
Author

Please can anyone help me

nilesh_gangurde
Partner - Specialist
Partner - Specialist

First take the Dates which you required to build logic into single Temp Table and then do the above mentioned logic.

-Nilesh

MK_QSL
MVP
MVP

FIRSTSORTEDVALUE(sum(if(DateUpdate<DueDate and not isnull(DateIssue),1,0)),

-IF(DateUpdate<DueDate,DateUpdate))

or

FIRSTSORTEDVALUE(sum(if(DateUpdate<DueDate and not isnull(DateIssue),1,0)),

IF(DateUpdate<DueDate,DateUpdate))

Not applicable
Author

Thanks and when I am passing this it is showing error in expression.