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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Max function in Time

As a beginner, I would like to understand


Sum({<Year=, Month=, Quarter=, Week=, DateField=, DateNum={">=$(=Num(YearStart(Max(DateNum))))<=$(=Max(DateNum))"}>} Sales)

but not

Sum({<Year=, Month=, Quarter=, Week=, DateField=, DateNum={">=$(=Num(YearStart(DateNum)))<=$(=DateNum)"}>} Sales)

My understanding is the expression will take the value of selected Date, thus result is the same. Why is MAX function  needed here? Any implication if I use the 2nd expression?

1 Solution

Accepted Solutions
marcus_sommer

Referring to a field returns only a value if there is only a unique fieldvalue available - otherwise the result is NULL. Therefore the suggestion to use always aggregations, see: Use Aggregation Functions!

- Marcus

View solution in original post

2 Replies
marcus_sommer

Referring to a field returns only a value if there is only a unique fieldvalue available - otherwise the result is NULL. Therefore the suggestion to use always aggregations, see: Use Aggregation Functions!

- Marcus

Anonymous
Not applicable
Author

Thanks Marcus. Your answer is clear.