Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Ramu_i
Creator II
Creator II

Based on date field it will display the date range - 1 Month, 3 Months, 6, months, 5 week, 10 weeks, MTD, QTD, YTD, YOY, PMTD, PQTD, PYTD

Hi All,

I have date field date is

23/Dec/2022

22/Dec/2022

....

Different filters, Matric are there, KPI's, Bar chart, Combo, Line...

I have filter1 filter2 , Date range filter

Date range Filter have

----------------------------

1 Month

3 Month

6 Months

5 Weeks

10 Weeks

MTD

PMTD

QTD

PQTD

YOY

YTD

PYTD

.....

we need to derive the Date Range filed and this field use as filter.

 

Could you please help on the senior.

Thanks Advance.

Ram

Labels (5)
2 Replies
vinieme12
Champion III
Champion III

refer this

Period Presets: Compare Periods on the fly - Qlik Community - 1486371

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
Ramu_i
Creator II
Creator II
Author

Hi Vinieme12,

I tried but not getting proper values.

I have used 

let vToday = today() ;

//Loop that handles 1,3,5 and 10 month DateRange values.
for each _interval in 1, 3, 5, 10
DateRanges:
LOAD
dayname('$(vToday)'-IterNo()+1) as Date_Value,
'$(_interval) Month' as DateRange
AutoGenerate 1
While
addmonths('$(vToday)',-$(_interval))<'$(vToday)'-IterNo()+1
;
next _interval

 

To find the 1 Month, 3 Months ... info, 

But here problem is 

1 Month showing the date range is   To day is   Dec-24-2022  , 1 Month range shows the   Dec-24-2022 to Nov-24-2022,

3 Months ---- Dec-24-2022 To Sep-24-2022  shows ...

My Requirement is:

-----------------------------------------

1 Month show (Dec -24-2022 is the current date) Nov-1-2022 To Nov-30-2022,

3 Months  --- Nov,Oct,Sep full month -Not display the current month.

Date range as field --- Just add the filed into UI side, Based on the selection range value displaying.

Could you help above scenario

 

Thanks advance

Ram