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

Announcements
Talend Cloud AWS EU Scheduled Outage: Starting Tues 26 May 21:00 CEST with expected completion Wed 27 May 01:00 CEST
cancel
Showing results for 
Search instead for 
Did you mean: 
Metty
Contributor
Contributor

Button for date selection, whole Year

Hi everyone,

I am pretty new to Qlik Sense and took over an assignment to do some adjustment on a dashboard.

The dashboard I am working on have two other Date selection buttons YTD and YTM. The action for YTD defined as

=IF($(vSel_CY) = YEAR(TODAY()),

'<=' & num(month(addmonths(today(),0))),

'=' & num(month(addmonths(today(),0)))

And the YTM is also something similar à   '<='  & num(month(addmonths(today()-30,0))) 

Was wondering how could I modify the formula in a way that it shows the full year with all months selected ?


or maybe should i use pick function instead??

 

NB: Field defined for button is [Date.Cal.Month]=["JAN","FEB","MAR","APR","MAY","JUN","JUL","AUG","SEP","OCT","NOV","DEC"] 

Labels (3)
1 Reply
rubenmarin

Hi, if the dates filter s are based on 'Today()' it would be better if you add a master calendar with flags,as an example: https://community.qlik.com/t5/QlikView-App-Dev/Master-Calendar-Flags/m-p/1279747

This whay you oly need to change set analysis like:

Sum({<$(VariableValue),Year,Month>} Sales)

And each button changes VariableValue to: CurMTDFlag={1} or CurYTDFlag={1}