10 Replies Latest reply on Jan 11, 2018 7:46 AM by Jim Dehner

# Sum by specific dates

Hello! Need your help Tableau Community, please! I want to calculate a sum of Sales by market by specific months and I don´t know how. I´ve attached the Tableau workbook with a database example, and in that I want to calculate the sales by market for January and March specificly. Please!

• ###### 1. Re: Sum by specific dates

Hi

Is there some reason you don't use a filter on month

as shown below

Then I brought in the subtotal from the analytics tab

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.

2 of 2 people found this helpful
• ###### 2. Re: Sum by specific dates

Thank your for your answer Jim! Sory for not being clear, of course there is one reason because I don´t use the filter and is because I need the sum for another calculation and I need the viz like just one period of time and not for two. I´m grateful for your help!

• ###### 3. Re: Sum by specific dates

Then plan on an LOD expression that includes an IF statement on month. I am

not at my computer but will look at tomorrow

Jim

On Jan 10, 2018 5:04 PM, "Katherine Anaya" <tableaucommunity@tableau.com>

• ###### 4. Re: Sum by specific dates

Something like

I know that's not perfect just can't get to it tonight

Jim

• ###### 5. Re: Sum by specific dates

Hi Katherine, helping Jim out

Step 1 - create calculated field

Step 2 - build your viz - although I see you noted you are going to use this calc inside another calculation.

HTH 10.4 attached

Peter

2 of 2 people found this helpful
• ###### 6. Re: Sum by specific dates

Ok! I´ll be waiting, thank you a lot!

• ###### 7. Re: Sum by specific dates

That is a good answer, it works perfectly! just one question, is it possible to show the calculate field "Specific Months" together with each month in a just one viz? for example in a chart with Specific Months next to the others month (all in the same axis) something like this

• ###### 8. Re: Sum by specific dates

Hi understand  what you want

try this

It will yield this

..

and you get 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.

2 of 2 people found this helpful
• ###### 9. Re: Sum by specific dates

Thank you for your time and answer Jim! Have a nice day!

• ###### 10. Re: Sum by specific dates

You have a good day also