Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
FLASH SALE: Save $500! Use code FLASH2026 at checkout until Feb 14th at 11:59PM ET. Register Now!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Month Range

Hello,

I am trying to group the months in range with the below label. Thank you for help!

for example;

<1

1-3

4-6

7-9

10-12

Month.jpg

Labels (1)
8 Replies
Not applicable
Author

you can do this on dimension, with if, if(month_field <3,'<3',.... but have a calculed dimension is not good.

i sugery create a group on scrip witch apllymap

map_month:

maping load * inline [

month,group´

1,<3

2,❤️

3,❤️

4,4-6

5,4-6

6,4-6

7,7-9

8,7-9

9,7-9

10,10-12

11,10-12

12,10-12

];

load  month,

applymap('map_month',month) as group_mont

from ...

sunny_talwar

May be like this:

If(Month < 3, Dual('1-3', 1),

If(Month < 6, Dual('4-6', 2),

If(Month < 9, Dual('7-9', 3), Dual('10-12', 4))))

swuehl
Champion III
Champion III

Are you trying to group your months in quarters?

What would <1 denote then?

If you want to group your months in quarters, create a quarter field in the load script, e.g. using

LOAD DateField,

          Month(DateField) as MonthField,

          Ceil(Month(DateField)/3) as Quarter,

          ...

Not applicable
Author

<1 would be less then a month

Not applicable
Author

Month2.jpg

Not applicable
Author

it should display like the picture below

Month2.jpg

Not applicable
Author

Hi Sunny,

It should look as shown in the print screen below

Month2.jpg

swuehl
Champion III
Champion III

Less than a month? Wouldn't this apply if you are considering a time intervals only, while months / quarters are denoting more like point in times (with more / less granularity)?