4 Replies Latest reply on Feb 14, 2018 12:50 PM by Vandana Samtani

# Calculation Help - Doing sum from multiple sources

Hi All,

Can you please let me know what I am missing in the calculation below?

Data is coming from 2 different sources -

Source 1  - We use the paid subs number of most recent date. The users has the flexibility to change the date range to get the number at that point of time.

if  [Date] = {FIXED :MAX([Date])}

THEN [Paid Subs]

END

Source 2 - We use the #Customer number of most recent date. This data is stored on weekly basis and we filter on subscription category 'B'

if [Report Start Date] = {FIXED :MAX([Report Start Date])} THEN [Customers]

END

On the dashboard i need to sum both the sources.

I need to sum both the numbers as of today but the users can also go back in time and check the numbers.

This is the formula i am using

sum([ Direct  Subs])+SUM([Sheet1 (Source2)].[Active Numbers])

Questions  -

1) I cannot put a where condition on source 2 in this formula to just give  the most recent number for category 'B'

2) This should update with the date range "Today" or any date selection instead of today.

Let me know if you have any suggestions.

Attached is the workbook.

Thanks,

Vandana

• ###### 1. Re: Calculation Help - Doing sum from multiple sources

Not Sure But Try This:

{SUM(IF {MAX(Date)}=Date THEN [Paid Subs] END )}

{SUM(IF {MAX(Report Start Date)}=Report Start Date THEN [Customers] END )}

Then you can Aggregate.

1 of 1 people found this helpful
• ###### 2. Re: Calculation Help - Doing sum from multiple sources

Hi Vandana,

Are you blending on Date Fields?

Thanks

Deepak

• ###### 3. Re: Calculation Help - Doing sum from multiple sources

hi Deepak, Thanks for your suggestion. This works on individual worksheets but when I try to bring the customers calculation into source 1 sheet to get a combined number it does not work. I have the date range filter on my dashboard. As of today both the numbers sum and give a correct number. as soon as i  change the today number to 1/22/2018 the calculation does not work. Tableau is picking up the right number as of 1/22 from source 1 but it's giving the most recent number from source 2. I am expecting that both the numbers should be as of 1/22/ I have attached the work book for your reference.  can you please look into this? any help would be appreciated. Thanks, Vandana

• ###### 4. Re: Calculation Help - Doing sum from multiple sources

Hi Deepak, Yes the data blending is around Date Conversion start , Date Conversion Today and Date SLice. Let me know if i am missing anything. Thanks, Vandana