Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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!
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:
Hope this helps,
Stefan
edit: attaching a sample
Message was edited by: swuehl
bump
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:
Hope this helps,
Stefan
edit: attaching a sample
Message was edited by: swuehl
Thnx Stefan, the we had thought about the pivot table method, however the first method worked like a charm!
Thnx again!