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

Displaying quarter

Hello All,

                    I gave an expression i.e.  ''Q' & Ceil(Month([SALE_ABSOLUTE_CDATE])/3) as Quarter.Now when i a displaying in Listbox i am getting

Q    Q1    Q2    Q3    Q4

                    Now i don't want Q.I want only Q1 Q2 Q3 Q4.Can any one please tell me how to do.

Regards,

R.Bharat Kishore

1 Solution

Accepted Solutions
jagan
Luminary Alumni
Luminary Alumni

Hi,

May be some records misses the date.  That is why you are getting the Q.

You can create a mapping table and map Months to Quarters.

Month  Quarter

Jan          Q1

Feb          Q1

Mar          Q1

Apr          Q2

May         Q2

Jun          Q2

Jul           Q3

Aug         Q3

Sep         Q3

Oct          Q4

Nov          Q4

Dec          Q4

Now use this Quarter field in list box.

Hope this helps you.

Regards,

Jagan.

View solution in original post

8 Replies
Anonymous
Not applicable

hi

Hope the following file will be helpful for your doubt

Regards

Ashok

jagan
Luminary Alumni
Luminary Alumni

Hi,

May be some records misses the date.  That is why you are getting the Q.

You can create a mapping table and map Months to Quarters.

Month  Quarter

Jan          Q1

Feb          Q1

Mar          Q1

Apr          Q2

May         Q2

Jun          Q2

Jul           Q3

Aug         Q3

Sep         Q3

Oct          Q4

Nov          Q4

Dec          Q4

Now use this Quarter field in list box.

Hope this helps you.

Regards,

Jagan.

bharatkishore
Creator III
Creator III
Author

Thanks For the reply,But in my data i am having field called Sale_AbsoluteDate, So when i am giving the condition as

          ceil(month([sale_absolutedate])/3) as quater.

Is my conditon wrong or anything i can change in the list box.

Regards,

R.Bharat Kishore

bharatkishore
Creator III
Creator III
Author

Thanks For the reply,But in my data i am having field called Sale_AbsoluteDate, So when i am giving the condition as

          ceil(month([sale_absolutedate])/3) as quater.

Is my conditon wrong or anything i can change in the list box.

Regards,

R.Bharat Kishore

CELAMBARASAN
Partner - Champion
Partner - Champion

Hi,

     This problem may occur due to the invalid date format i.e, you default date format didn't match to the date format in the date field otherwise date field may have some null values.check with it.

     There is nothing wrong in your expression.

     Its better if you use the approach suggested by jagan mohan.Because you don't need to calculate on the expression which consumes little bit time on loading listbox values.

Hope it helps

Celambarasan

bharatkishore
Creator III
Creator III
Author

Thanks a lot.Now i will apply as you said.

Regards,

R.Bharat Kishore

bharatkishore
Creator III
Creator III
Author

Can you please say the process of how do we do the mapping table.If possible please attach a sample qlikview file.

Regards,

R.Bharat Kishore

jagan
Luminary Alumni
Luminary Alumni

Hi,

You can refer chandashok example attached above.

Regards,

Jagan.