Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
We have a requirement where we want to have a customized date range for the months.
For example :
Jan 2023 {29/12/2023 - 26/01/2023 } should have dates ranging from Last Thursday of previous month (Dec 2022) to Last Thursday of Current month (Jan 2023) -
Nov 2023 - {26/10/2023 - 30/11/2023} and so on and so forth.
Thanks
As you mentioned this Jan 2023 {29/12/2023 - 26/01/2023 }
So i presume a month starts from last friday of last month and end at its last thursday;
Try This:-
Load RN,Day,Date(RN) as Date, Month(RN) as Original,Month(D_) as required;
Load *, If(D = '0',RN,7+RN-D) as D_,weekday(If(D = '0',RN,7+RN-D)) as w_da;
Load *, weekday(RN) as Day, IF(Num(Weekday(RN))-3>=0,Num(Weekday(RN))-3,Num(Weekday(RN))+4) as D;
////////////////// D Coulmn gives me next nearest thursday date difference, D_ becomes next thursday and month(D_) becomes your required month////////////////////////////
Load RecNo() as RN
AutoGenerate 500;
Adjust accordingly, Required Column is your required month, original column is just month name,
and RN is datefield.
Take a look at
https://community.qlik.com/t5/Member-Articles/Calendars/ta-p/1496392
What you want is very similar to a Broadcast calendar.
Hi,
This can be the solution.
https://community.qlik.com/t5/QlikView-App-Dev/Creating-A-Master-Calendar/td-p/341286
Thanks for replying but I want to customize the data range for every month?
For example : Nov 2023 Month year should have date range from last Thursday of Previous Month (i.e. 26/10/2023) till Last Thursday of Current Month (i.e. 30/11/2023) and so on and so forth and not from 01/11/2023 to 30/11/2023).
Any idea how can I achieve this?
As you mentioned this Jan 2023 {29/12/2023 - 26/01/2023 }
So i presume a month starts from last friday of last month and end at its last thursday;
Try This:-
Load RN,Day,Date(RN) as Date, Month(RN) as Original,Month(D_) as required;
Load *, If(D = '0',RN,7+RN-D) as D_,weekday(If(D = '0',RN,7+RN-D)) as w_da;
Load *, weekday(RN) as Day, IF(Num(Weekday(RN))-3>=0,Num(Weekday(RN))-3,Num(Weekday(RN))+4) as D;
////////////////// D Coulmn gives me next nearest thursday date difference, D_ becomes next thursday and month(D_) becomes your required month////////////////////////////
Load RecNo() as RN
AutoGenerate 500;
Adjust accordingly, Required Column is your required month, original column is just month name,
and RN is datefield.
Take a look at
https://community.qlik.com/t5/Member-Articles/Calendars/ta-p/1496392
What you want is very similar to a Broadcast calendar.