Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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!
use getfieldselections(myField) to read the selected data
Hi
Try like this
= Sum({<Date={">=$(=date(YearStart(Max(Date))))<=$(=date(max(Date)))"}, Month=, Year=>} Revenue)
See this discussion: How to select dates for the current month
Instead of MonthStart you would use YearStart.
May be this:
Sum({<Date = {"$(='>=' & Date(YearStart(Max(Date)), 'yourDateFormat') & '<=' & Date(Max(Date), 'yourDateFormat'))"}>}Revenue)
HTH
Best,
Sunny