cancel
Showing results for
Did you mean:
Creator III

Quarter Creation

How do I create a quarter period in my script. Please find the attached file for clarity. Thanks

1 Solution

Accepted Solutions
MVP

You can use Day() function for that:

NoConcatenate

[Supply Field],

If(Len(Trim(Region)) = 0, Peek('Region'), Region) as Region,

Supplier,

Type,

[Daily Average],

[Annual Cumm],

Date(Num#(Date)) as Date,

Month(Num#(Date)) as Month,

'Q' & Ceil(Month(Num#(Date))/3) as Quarter,

MonthName(Num#(Date)) as MonthYear,

Year(Num#(Date)) as Year,

Day(Num#(Date)) as Day,

Value

I would suggest looking into a master calendar script for doing this:

And for a list of date and time function, visit help:

Date and time functions ‒ QlikView

3 Replies
MVP

This:

NoConcatenate

[Supply Field],

If(Len(Trim(Region)) = 0, Peek('Region'), Region) as Region,

Supplier,

Type,

[Daily Average],

[Annual Cumm],

Date(Num#(Date)) as Date,

Month(Num#(Date)) as Month,

'Q' & Ceil(Month(Num#(Date))/3) as Quarter,

MonthName(Num#(Date)) as MonthYear,

Year(Num#(Date)) as Year,

Value

Creator III
Author

Thanks Man. How about the day of the month in the script?

MVP

You can use Day() function for that:

NoConcatenate

[Supply Field],

If(Len(Trim(Region)) = 0, Peek('Region'), Region) as Region,

Supplier,

Type,

[Daily Average],

[Annual Cumm],

Date(Num#(Date)) as Date,

Month(Num#(Date)) as Month,

'Q' & Ceil(Month(Num#(Date))/3) as Quarter,

MonthName(Num#(Date)) as MonthYear,

Year(Num#(Date)) as Year,

Day(Num#(Date)) as Day,

Value

I would suggest looking into a master calendar script for doing this:

And for a list of date and time function, visit help:

Date and time functions ‒ QlikView

Community Browser