1 Reply Latest reply on Aug 29, 2016 6:50 PM by Kathryn Bridges

Calc the difference of orders in/out by day

Hi there - I'm hoping someone can help me create a formula to calculate the difference between orders in (orders placed) and orders out (orders shipped) by day.  What i've done is created a simple sheet showing the countd of orders placed by day, and i've created a duplicate sheet showing the countd of orders shipped by day.  What I'm having trouble with is showing the difference between the two by day.  The purpose of this is that it will show me if my work in process is growing or shrinking by day so i can monitor that trend.  I envision another sheet showing this diff which i would place on the dashboard as essentially a third column.  I've attached a twbx using the Superstore data to illustrate.  My guess is i need to write a formula subtracting the countd of orders placed and orders shipped but i don't know how to do that.  I'm also open to better ways to convey this.  As a simple example:

Day 1: 100 orders in, 150 orders out : this would yield -50 (the wip shrank by 50)

Day 2: 200 orders in, 70 orders out : this would yield +130 (the wip grew by 130)

• 1. Re: Calc the difference of orders in/out by day

Hi Paul,

Sorry I don't have Tableau 10 yet (still stuck in 9.3 so I can publish to our server), so I wasn't able to download your workbook.

However, I've created an example with Superstore data that looks at two measures, and then a ratio of them day-by-day. You'll want to change the field "Prof/Quantity" to a difference instead of ratio.

If you just wanted the difference between the two, I think if you created a calculated field that was something like: (sum[OrdersPlaces]-sum[OrdersShipped]), and then put that in the columns with date on the X axis, you should see that trend.

Hope this helps!