Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi QLikians,
I need specific months data, can you please help me with the forumla.
I have Date it needs to be change in month. i applied =MonthName(Date) for getting months so i am getting Apr 20202, May2022 like this.
I want data only for Oct 2022, Sep 2022 please help me with the formula.
Hi
change the dimensoin monthname(Date) as a calculated dimension
somethink like this
if(Monthname(Date)='Sept 2022' and Monthname(date) ='Oct 2022', Monthname(Date) )
unselect include null values
If you want the twice month selected dynamically ( for example the last 2 past month before the current month , apply the same approach using addmonth() and Today() functions
monthname(addmonths(today(),-2)) For septembre ( 2 months before actual month)
monthname(addmonths(today(),-1)) for octobre
Option1 You can restrict data using set analysis in your measures
example ins your measures ad below set analysis
=sum({<Date={">=$(=Date(Monthstart(Max(Date),-2)))<=$(=Date(MonthEnd(Max(Date),-1)))"}>} Sales)
OR
Option2 Restrict Dimension values using calculated dimension
example below will restrict data for last 2 months
replace = MonthName(Date) with below
=aggr(MonthName(Only({<Date={">=$(=Date(Monthstart(Max(Date),-2)))<=$(=Date(MonthEnd(Max(Date),-1)))"}>}Date)),Date)