8 Replies Latest reply on Sep 4, 2018 8:45 AM by Imran Azam

# Calculate monthly sales from given start and end date

I'm trying to calculate monthly sale from a single record Monthly recognisable sales.  Monthly sale would be  (Total / length of contact). I want this spread  monthly over the length contract. For example: below is  the table

Name
start date
end date
total
length of contact
subscription 101/04/201831/08/20187005

How can I get tableau to show the 'monthly sales  in months between the start and end date?

i want to show its something like below

Name
start date
end date
total
length of contact30 April 2018
31 May2018

30 June 2018

31 july 2018

31 august 2018

subscription 101/04/201831/08/20187005140140140140140

can this be done?

please note this is one subscription i have loads in my data,

I have attached the tableau workbook on to this ( this  example has 3 subscriptions)

• ###### 1. Re: Calculate monthly sales from given start and end date

The easiest way is to create a separate excel file containing your all months and then Join it with your data. Now, Bring the Excel sheet Months on Columns in Tableau to give you Different Months. Then Use this Calc and bring it Into Text Label.

{SUM(Total)}/5

Thanks

Deepak

If it Helps, Pl Mark it Helpful and CORRECT to close Thread

1 of 1 people found this helpful
• ###### 2. Re: Calculate monthly sales from given start and end date

Thanks for the reply and help

How do i join the dates excel sheet to this??

• ###### 3. Re: Calculate monthly sales from given start and end date

In data view create a join calculation on your excl dates file to make it similar to your dates in your dataset make it left join and one more thing i see that you have 2 dates so pivot your start and end dates as one date column and then join with excel data. I am away from computer if u are not able to do i will do when i can do

Thanks

Deepak

• ###### 4. Re: Calculate monthly sales from given start and end date

Hi thank you once again deepak,

I am a bit confused how to do this, when you are on your computer can you do this on my example tableau sheet i attached please?

thank you so much

• ###### 5. Re: Calculate monthly sales from given start and end date

Hi Imran,

I saw your Data, I  think it needs to be structured properly to get you what you need. You may also have a look here

Thanks

Deepak

• ###### 6. Re: Calculate monthly sales from given start and end date

Thanks again

I will look at that.

what is the best approach I can take to do this?

How should i structure the data ti take the first approach you mentioned?

• ###### 7. Re: Calculate monthly sales from given start and end date

Hi Deepak,

I am really struggling to do this , can you provide any more tips for this?

thank you

• ###### 8. Re: Calculate monthly sales from given start and end date

Hi Deepak

IS it possible i can email you regarding this task? i am having great difficulty fixing this.

Regards

Imran