4 Replies Latest reply on Sep 20, 2018 6:03 AM by Atishi Goyal

# calculate % of sum total with base as the first number

Hi,

I want to calculate the % of every month with respect to the first month as my base number so that the % always in 1st month is 100%

View1: This is my cohort, for september 2015 with revenue in decreasing order from september 2015 to december 2015

View 2:

This is my % of total, which should be 100% for september 2015 as the calculation must be 82493/82493 = 100%, 39615/82493 = 48% and so on, but when I use the table calculation percent of total it sums up all
Sum = 82493+39615+35908+771 = 158787 and does the calculation  82493/158787 = 51.95%.

Please let me know the workaroud here.

Emmanuel Ikehi can you help me out in this.

• ###### 1. Re: calculate % of sum total with base as the first number

Hi Atish, I have an idea, but attach a sample workbook (.twbx file) so I can try it out.

Emmanuel.

• ###### 2. Re: calculate % of sum total with base as the first number

Please find attached the sample twbx file.

• ###### 3. Re: calculate % of sum total with base as the first number

Hi Atishi,

Find attached the solution. It was more complex than I had imagined. I have used a combination of ISNULL() and PREVIOUS_VALUE() to find the first non-null value in a row. See the calculated field First Non-Null Value in the attached workbook to understand how it works.

I hope this is what you are looking for.

Emmanuel.