Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
sonysree88
Creator II
Creator II

Quarters wrong

Hi all,

In my script am using this expression to dispaly quarters information 'Q' & Ceil(Month([Sales_Date]/3)) as Quarters

but coming to report getting the data like this in Quarters filed

Q

Q1

Q2

.

.

.

Q8

Q9

Q10

Q11

Q12

Can you please give me the solution for this..

1 Solution

Accepted Solutions
oknotsen
Master III
Master III

I assume you have NULL values in the Date field. In other words: The Date field is empty on some rows.

May you live in interesting times!

View solution in original post

7 Replies
oknotsen
Master III
Master III

You are dividing the Date by 3, not the Month.

Move the /3 to the right, past 1 bracket, and that should solve your problem.

'Q' & Ceil(Month([Sales_Date])/3)

May you live in interesting times!
sonysree88
Creator II
Creator II
Author

Here 'Q' & Ceil(Month(Date)/3) as Quarters   ---->  its working fine but again am getting the data like this :

now 4 quarters are coming correctly but Extra Q also have in data,Why its coming didnt understand

Q

Q1

Q2

Q3

Q4

oknotsen
Master III
Master III

I assume you have NULL values in the Date field. In other words: The Date field is empty on some rows.

May you live in interesting times!
Chanty4u
MVP
MVP

create something  lik dis

Quarters_Map:

MAPPING LOAD

     rowno() as Month,

     'Q' & Ceil(rowno()/3) as Quarter

Autogenerate(12);

sonysree88
Creator II
Creator II
Author

Yes Date filed is having null values ..

Now its working fine Thanks for the answers

sunny_talwar

It might also be possible that some of your date fields are not read as date and when you find it's Month(), it ends up giving you null. Look here for how to get the dates right in QlikView

Get the Dates Right

Why don’t my dates work?

oknotsen
Master III
Master III

If your question is now answered, please flag the Correct Answer (via the big "Correct Answer" button near every post) and Helpful Answers (found under the Actions menu under every post).

If not, please make clear what part of this topic you still need help with .

May you live in interesting times!