6 Replies Latest reply on Feb 26, 2018 9:42 AM by Samanth Yadav

# Sales Calculation

Hi All,

I have employee sales data for each month where I have employee name, date and sales. I need help in sales calculation. For example: In Jan 2017, the sum of sales for employee Sam

was \$10,000 and in Feb 2017, the sum of sales was \$20,000. So when I select the date filter for Feb 2017, I need to see the sum of sales for Jan 2017 and Feb 2017(i.e; \$30,000). Similarly, when I select march I need to see the sum of sales for Jan, Feb and march (i.e; \$60,000), so on till Dec 2017. But when I select  Feb 2018,  I should see the sum of sales for Jan 2018 and Feb 2018 (i.e; \$290,000), Similarly for march 2018.

Can someone help me out on this calculation.

Attached is the Tableau Package Workbook.

Regards,

Sam

Shinichiro Murakami

• ###### 1. Re: Sales Calculation

Hi Samanth,

As a manner of forum, please don't mentioned individual name.

http://kb.tableau.com/articles/howto/filtering-view-without-filtering-underlying-data

Thanks,

Shin

1 of 1 people found this helpful
• ###### 2. Re: Sales Calculation

Hi, Samanth

Below is the screenshot for reference. basically, you need change the date filter to a window calculation

Hope this helps

ZZ

1 of 1 people found this helpful
• ###### 3. Re: Sales Calculation

See attached.

I changed your sheet to use a parameter rather than a quick filter.  And then I created a calc that triggers off the selected parameter value.

I created the calc [Date MY] to use as an input to populate the parameter values.  It takes all the dates and truncates them to the first day of the month of the date in the [Date] field.  I then changed the display format to the format you want your users to see.

So let the user select a value, and the calc will gather only in the selected year, up to the selected month.

I created sheet 1(2) to display all the monthly values to test the values summed in Sheet 1.

1 of 1 people found this helpful
• ###### 4. Re: Sales Calculation

Sure Shin.

Thank you.

• ###### 5. Re: Sales Calculation

Hi ZZ,

Thanks a lot for helping me out.

Regards,

Samanth

• ###### 6. Re: Sales Calculation

Hi Joe,

Thank you for the help.

Regards,

Samanth