3 Replies Latest reply on Jan 31, 2017 12:40 PM by Walt Reed

# How to calculate sum of Sales for different deal Stages but for the same period

I have 2 different Stage Sales Group: Won and Open and I need to sum 2 amounts in Tableau but the problem is that the period is the same:

[Won] = IF  TODAY() - [Close Date] <= 7 and [Stage Group]= 'Won' then (-[Sales])

END

[Open]  = IF TODAY() - [Close Date] <= 7 and [Stage Group]= 'Open' and [Time group] = 'New'

then [Sales]

Now I don't see any value if I simply sum up them.

e.g. [Won] = -10

[Open] = 5

[Won] + [Open] = -5

How can I calculate this amount [Won] + [Open]? They are 2 different values but the same time period

• ###### 1. Re: How to calculate sum of Sales for different deal Stages but for the same period

I decided to use the following formula for sum SUM([Open])+SUM([Won])

But the problem is that when I don't use Stage group in columns everything is ok

When I use Stage Group in columns I don't see the Sum

Could you help me with this problem?

• ###### 2. Re: How to calculate sum of Sales for different deal Stages but for the same period

To tell you the truth I would like to see Open+Won value in Column Open as a special Value for Open new deals

• ###### 3. Re: How to calculate sum of Sales for different deal Stages but for the same period

Karolina,

It makes sense that this is the result. Since the values for Open and Won are based on the Stage Group values, each of those will show up under its respective column. [Win] is only calculated when [Stage Group]='Won', so that's why the value for Won shows as null under "Open."

Can you help explain what you want the final view to look like? If you have a workbook you could attach that would be really helpful.

Walt