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

Announcements
Q&A with Qlik - Qlik Cloud Migration: Questions about migrating to Qlik Cloud? Catch the latest replay!
cancel
Showing results for 
Search instead for 
Did you mean: 
AdrianS1
Contributor III
Contributor III

FilterPane with WTD,MTD,YTD filters

Hi guys, i have a problem. I need to have a three filter panes with WTD,MTD,YTD. I have one table with OrderDate and Sales.

I used function for YTD =(YearToDate(ORDER_DATE)) and it works. How should i switch this function to MTD and WTD. Could someone help me?

Labels (1)
1 Reply
BrunPierre
Partner - Master II
Partner - Master II

MTD =Aggr(Only({<DateField={">=$(=MonthStart(Max(DateField)))<=$(=AddMonths(Max(DateField)))"}>} DateField), DateField)


WTD = Aggr(Only({<DateField={">=$(=WeekStart(Max(DateField)))<=$(=Date(Max(DateField) ))"}>} DateField), DateField)