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: 
lakshmanvepuri
Creator
Creator

Creating Customized Calendar

Hi,

Please let me know how to create the custom calendar based on :

Today ( starting from 7 AM to tomorrow 6:59 AM)

Yesterday ( yesterday 7 AM to today 6:59 AM )

Last 24 hours ( based on the current hour  it should get the last 24 hours time stamp )

Thanks a lot.

Note

I have created  custom calendar for Current Month, Last Month  and Last 30 days.

Let vCurrMonth = Ceil(Today()-MonthStart(Today()));

Let vLastMonth = Ceil(MonthEnd(Today(), -1)-MonthStart(Today(), -1));

Let vCurr_Last = $(vLastMonth)+$(vCurrMonth);

Let v_lastMonthEnd = $(vCurrMonth)+1;

if (vCurrMonth)>0 then

Selection_1:

LOAD * INLINE [

    Selection_Name,Selection_Start_Value, Selection_End_Value

    "Last 30 Days",30,-1,

    "Current Month", $(vCurrMonth),-1  

    "Last Month",$(vCurr_Last), $(v_lastMonthEnd)

];

else

Selection_1:

LOAD * INLINE [

    Selection_Name,Selection_Start_Value, Selection_End_Value

    "Last 30 Days",30,-1,  

    "Last Month",$(vCurr_Last), $(v_lastMonthEnd)

];

end if

regards

Kumar

Message was edited by: Lakshmana Vepuri

1 Reply
amit_saini
Master III
Master III

Hi,

Not sure if this helps u , but i have done something similar with the help of variables .

Create 2 variable as below:

vStart:=DATE(num(today())-1 + num('06:00:00'),'DD.MM.YYYY hh:mm:ss')

vEnd :=DATE(num(today()) + num('05:59:59'),'DD.MM.YYYY hh:mm:ss')

And then later ,changes at expression side like below:

You need to include these 2 variables to those expression ,which should changes based on ur requirement (Yesterday 6 AM to today's 05:59:59)

Give a try

Thanks,

AS