3 Replies Latest reply: Jun 7, 2016 5:39 AM by Nikolay Leshkevich

# How can I create table with two different total by one dimension?

Hi,
I have troubling with following table

I need calculate total for period (January-June) for each year, in next month this period would be January-July and so on
After that column I need to calculate common total. Is it real?

Thanks in advance for any help with this!

DimensionJanuaryFebruaryMarchAprilMayJuneJulyAugustSeptemberOctoberNovemberDecember

Total

Jan-June

Total
20141 799 5471 721 2402 093 0462 149 2501 522 0041 543 9251 703 2421 808 4872 168 3882 242 0772 306 3443 295 80710 829 05224 353 357
20151 883 8721 967 7692 030 3531 869 6341 502 3361 467 1241 652 9681 712 5122 211 0502 403 8812 522 0713 288 68310 721 088 24 512 253
20161 128 4101 675 0001 562 0042 009 2501 599 547164 0006 538 6646 538 664
• ###### Re: How can I create table with two different total by one dimension?

Yes, that's possible. It's easiest to create new field for this in the script:

Periods:

LOAD * INLINE [

Period, Month

January, January

February, February,

....etc

December, December

Total Jan-June, January

Total Jan-June, February

...etc

Total Jan-June, June

Total, January

Total, February,

....etc

Total, December

];

Then use the new Period field instead of Month as dimension in your pivot table.

• ###### Re: How can I create table with two different total by one dimension?

Hi Nick!

May be the solution of Gysbert is better than mine! But...

If you don't want to work on the scrip, I would suggest two chart-tables:

One first: a pivot table with Year and Month as dimensions and the expression =Sum(values). Feel free to mark "Show Partial Sums" to both dimensions (on Presentation tab) to see the totals. Example:

One second: a Straight Table with Year as the only dimension and the following expressions:

As you can see, I have used set analysis to set the intervals of months.

Hope it helps!

Best regards,

Marcello

• ###### Re: How can I create table with two different total by one dimension?

Thank you all very much!