9 Replies Latest reply on Aug 15, 2019 3:08 PM by Rafael Millan

# Cumulative percentage current month

Good morning to everyone,

First of all, excuse my english.

I would like to see if you can help me with a problem that is being presented to me in Tableau Desktop. The data I show is an example, but I would like to transfer them to a real case.

For forecasting topics, I would like to be able to get the percentage of the accumulated sales of the current month against the accumulated sales of the previous month in the same period. For example, the first 10 days of august against the first 10 days of july.

What I did is put the days in columns, and the months in rows. I create a cumulative table calculation of the months and a secondary calculation of percentage difference up.

I wolud like to take the percentage of the current day and multiply it by the accumulated sales of the previous month to see what is the projection of this month would be based on that percentage.

I suppose that the easiest way would be to create a calculated field that gives me the value of that percentage, and then, multiply it by the accumulated sales of the previous month, but I don´t know how to do it.

I thank you very much.

I hope I have expressed myself well.

Attached workbook

• ###### 1. Re: Cumulative percentage current month

Hi is this what yo want

it returns this

jim

If this posts assists in resolving the question, please mark it helpful or as the 'correct answer' if it resolves the question. This will help other users find the same answer/resolution.  Thank you.

1 of 1 people found this helpful
• ###### 2. Re: Cumulative percentage current month

Thank´s Jim,

The problem I see is that I need to have the visible table without filters in order to visualize the result,

What I would like to be able, on another sheet, is multiply that percentage by the sum of the sales of the previous month.

I give you a concrete example.

• From August 1 to 10 I bring \$2,175 in sales, 16.62% over the previous month in the same period, wich was \$1,865.
• I wold think that i will close the month of August by 16.62% over the previous month, wich was \$6,107, with what I would have for August \$7,122.
• This is with today´s behavior, compared to last month, but tomorrow instead of 16.62% it can be 12.56% or any other, depending on the sale.

Basically, what I would like would be to have that dynamic percentage based on today to be able to operate it against other measures.

Thank´s for you help.

I hope I have explained

• ###### 3. Re: Cumulative percentage current month

that is a different question and I did not get that from your original post

see the attached  - I only took it to the point that it returns the fixed MOM percentage difference - you can use it in any formula

I created a copy of the data and joined it to itself  so you have a last month set of data and a this month set of data that are joined

this is the fixed sales by month

this is the fixed sales from the prior month (the second data set)

this is the percent MOM

they return this

the values are all fixed at the month year level so can be used in other calculations, lods or table calcs

Jim

If this posts assists in resolving the question, please mark it helpful or as the 'correct answer' if it resolves the question. This will help other users find the same answer/resolution.  Thank you.

1 of 1 people found this helpful
• ###### 4. Re: Cumulative percentage current month

Is this what you are looking for ?

Thanks

1 of 1 people found this helpful
• ###### 5. Re: Cumulative percentage current month

Thank´s again Jin,

Unfortunately, that solution doesn´t work for me, because I have several sources that I prepare in Tableau Prep and upload as an online data source.

I´m going to try doing it over the origin of the data.

Thank you so much.

• ###### 6. Re: Cumulative percentage current month

What I need is to "isolate" the percentage so I can use it later.

Thank you so much..!

• ###### 7. Re: Cumulative percentage current month

OK

let us know

Jim

• ###### 8. Re: Cumulative percentage current month

Hi @RAFAEL MILLAN

I am not sure if i am in the right direction to get to what you are trying to accomplish.

Based on my understanding, the %Diff that I calculated in the attached workbook gets repeated every row of the data set irrespective of the month/day

Thanks