Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Combined time dimension

Hi everyone,

I’m trying to create a table (or chart) with a dimension that combines Months and Quarters.

The table should show Product Sales in the following way:

Product

Jan

Feb

Mar

Q1

Apr

May

Jun

Q2

A

5

3

2

10

5

6

7

17

and so on


I know that in a table I could make each column an expression; however it would be much better if I could somehow create a calculated dimension and simply place it horizontally.

I would appreciate any ideas.

Cheers!

1 Solution

Accepted Solutions
swuehl
MVP
MVP

Just for the moment, I can see two different approaches:

a) Create a new field with the values for Months and Quarters as shown, and link these values to your Months in your calendar, maybe like

LOAD *, month(MakeDate(2012,Month#)) as Month INLINE [

MonthQuarterDim, Month#

Jan, 1

Feb, 2

Mrz, 3

Q1, 1

Q1, 2

Q1, 3

];

(only first quarter shown)

then use this new field MonthQuarterDim as dimension.

b) a little bit simpler, but also a little bit different would be to create pivot table with two dimensions Quarters and Months, then use partial sums on dimension Months and maybe indent mode in style tab. It could look like this:

MonthQuarters.png

Hope this helps,

Stefan

edit: attaching a sample

Message was edited by: swuehl

View solution in original post

3 Replies
Not applicable
Author

bump

swuehl
MVP
MVP

Just for the moment, I can see two different approaches:

a) Create a new field with the values for Months and Quarters as shown, and link these values to your Months in your calendar, maybe like

LOAD *, month(MakeDate(2012,Month#)) as Month INLINE [

MonthQuarterDim, Month#

Jan, 1

Feb, 2

Mrz, 3

Q1, 1

Q1, 2

Q1, 3

];

(only first quarter shown)

then use this new field MonthQuarterDim as dimension.

b) a little bit simpler, but also a little bit different would be to create pivot table with two dimensions Quarters and Months, then use partial sums on dimension Months and maybe indent mode in style tab. It could look like this:

MonthQuarters.png

Hope this helps,

Stefan

edit: attaching a sample

Message was edited by: swuehl

Not applicable
Author

Thnx Stefan, the we had thought about the pivot table method, however the first method worked like a charm!

Thnx again!