Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
(I am using Qlikview10(unlicensed).
I need to create a calendar which should contain year, period, month, week, startdate, Enddate. I have managed to create Year, Month, Week, Day individually.
But How can I create a period or month. I have used this query.
Calendar:
LOAD
date(yearstart(Date),'YYYY') as Year,
date(monthstart(Date),'MMM YY') as Month,
weekday(Date) as WeekDay,
day(Date) as Day;
LOAD date(recno()+date#('20021231','YYYYMMDD')) as Date
AUTOGENERATE today()-date#('20021231','YYYYMMDD')
Please find attached of the excel-sheet. In this excel sheet you can see there is year, week, startdate and enddate. Can I able to create month and period from this.
Please suggest.
Hello Anand,
It worked.
I did not understand the logic of Q' & ceil(month(Date) / 3) AS Quarter .
Please explain.
Thanks.
Hi,
Can you please explain me why you have used
inyeartodate(TempDate, $(vToday),0)*-1 AS CurYTDFlag,
inyeartodate(TempDate,$(vToday),-1) * -1 AS LastYTDFlag
Thanks.
Hi,
Thanks, I explain you In a year we have 4 quarters so when we us month(Date) / 3 it divides into 4 parts but there is no Q word so we just concatedate it by this
Q' & ceil(month(Date) / 3) AS Quarter
Rgds
Anand
CurYTDFlag creates a flag (1) that indicates if it is the current year.
LastYTDFlag creates a flag (1) that indicates if it is the previous year.
Select the fields Year, CurYTDFlag and LastYTDFlag to see how it works.
These flags can be used in many ways, for example in expressions like:
Sum({<CurYTDFlag={1}>} Sales) //Returns only the Sum of the Sales of the current year
Sum({<LastYTDFlag={1}>} Sales) //Returns only the Sum of the Sales of the previous year
Hope it's helpfull.
Dennis.
Thanks Anand..
I understood the logic...
Yeah.. I got you..
Thanks,
Sandeepa