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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Working with dates and selections

Hi!
I have to sum revenues from the 1st of January, 2015 to a day that an user can select.

For example, if I select the 1st of July, 2015 Qlik returns the sum of revenues from the 1st of January to the 1st of July.

How can I do this?

Thanks!

4 Replies
alexandros17
Partner - Champion III
Partner - Champion III

use getfieldselections(myField) to read the selected data

MayilVahanan

Hi

Try like this

= Sum({<Date={">=$(=date(YearStart(Max(Date))))<=$(=date(max(Date)))"}, Month=, Year=>} Revenue)

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

See this discussion: How to select dates for the current month

Instead of MonthStart you would use YearStart.


talk is cheap, supply exceeds demand
sunny_talwar

May be this:

Sum({<Date = {"$(='>=' & Date(YearStart(Max(Date)), 'yourDateFormat') & '<=' & Date(Max(Date), 'yourDateFormat'))"}>}Revenue)

HTH

Best,

Sunny