Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
qlikbbguser
Contributor II
Contributor II

Expression not returning the value associated with latest date

hi all,

I have this expression hoping to return the 'Sales Revenue' as of latest date (based on the QlikDate field). but it returns the sum of sales revenue for ALL dates - any clue why?

the 'QlikDate_short' field is just the 'QlikDate' field converted to date format.

Example: 

QlikDate = 07/01/2023

QlikDate_short = 7/1/2023

qlikbbguser_0-1724619909826.png

 

Labels (1)
5 Replies
Lisa_P
Employee
Employee

change the QlikDate_Short to:

QlikDate_Short={'$(=date(max(QlikDate), 'M/D/YYYY'))'}

qlikbbguser
Contributor II
Contributor II
Author

Thank you.

Unfortunately it returns 'Error in expression = {'-'} 

nina2
Contributor III
Contributor III

Hi, 

It seems QlikDate_Short is not a dimension

Why not like this :

sum(

{<

QlikDate={$(=max({<Source={'SAP - Hist Terminal'}>}QlikDate))},

[Metric Name]={'Sales Revenue'},Source={'SAP - Hist Terminal'}

>}

Value)

?

Regards,

Nina

Or
MVP
MVP

QlikDate_Short isn't being recognized as a field. Are you sure it's there? It should be colored the same as the other fields in that oddball shade of... fallow? Same as Source, Value, etc.

Lisa_P
Employee
Employee

I think it's just a typo for the field name ..

QlikDate_short  not QlikDate_Short