Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello .
I just start to work with Qlik Sence and i have a Issue i need to solve .
I have table with 1 dimention and 4 measures .
The table is duplicated in same work sheet , first copy filtered by date from filter pane , second must be filtered
from start of year to date what selected in filter pane .
how i can do the second request ?
Thank you for your attention
Hi Ilya, if DateField is the field used to filter, the second can be:
Sum({<DateField={">=$(=Num(Monthstart(Max(DateField))))<=$(=Max(DateField))"}>} Sales)
Ruben thank you for your reply
my date filter have two feild YEAR and MONTH i try to write something like
COUNT ({$<Year={GetFieldSelections(Year)}>*<Month= {Max(Month)>}SALES )
But it doesnt work .
also i try script like this
COUNT ({$<Year={2018}>}sales) - work perfect but not a versatile
when i alter my script to COUNT ({$<Year={GetFieldSelections(Year)}>}sales )
I get Error
Hi, if you want a value from start of the year to date salected, shouldn't it be only one year and the dates to filter from 01/01 to date selected? and is a count of sales (not a sum?)?
There are different possibilities based on what you really want, it can be:
- COUNT ({$<Month={"<=Max(Month)"}>}SALES) // for all years until month selected
- COUNT ({$<Year={$(=Max(Year))}, Month={"<=$(=Max(Month))"}>}SALES) // for max years of seleted
- COUNT ({$<Year={$(=Max(Year))}, Month={"<=$(=Max(Month))"}>+<Year={"<$(=Max(Year))"}>}SALES)
- ...
Also, just to comment that in script you can create a date field based on month and year values:
Makedate(YearField, MonthField) as Date