Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
qlikviewwizard
Master II
Master II

Extra value in Quarter data - Q

Hi All,

I am getting Extra value in Quarter data - Q.

Using the below formula in script.

'Q'&ceil(month(date(HireDate))/3) as Quarter.

I am using SET DateFormat='DD-MMM-YYYY'; in script.

Please help me.

1.JPG

1 Solution

Accepted Solutions
Gysbert_Wassenaar

Try: if(IsNum(HireDate), 'Q'&ceil(month(date(HireDate))/3)) as Quarter.


talk is cheap, supply exceeds demand

View solution in original post

6 Replies
qlikmsg4u
Specialist
Specialist

Hi,

I think the dates with Null value or Missing dates creates this problem.

arulsettu
Master III
Master III

try like this

dual('Q'&ceil(month(date(HireDate))/3),ceil(month(date(HireDate))/3)) as Quarter

Gysbert_Wassenaar

Try: if(IsNum(HireDate), 'Q'&ceil(month(date(HireDate))/3)) as Quarter.


talk is cheap, supply exceeds demand
sunilkumarqv
Specialist II
Specialist II

try this

IF(Len(HireDate)>0,'Q'&ceil(month(date(HireDate))/3)) as Quarter.

qlikviewwizard
Master II
Master II
Author

jagan
Luminary Alumni
Luminary Alumni

Hi,

If you have missing dates in the field then you will get like this, check why you are getting empty values in Date column, if the date value is mandatory then this will be the issue, also those records will not be available for selection.

Cross check the missing dates, if it is not a concern then you can use

If(Len(Trim(HireDate))>0,'Q' & Ceil(Month(HireDate)/3)) as Quarter


Hope this helps you.

Regards,

Jagan.