KNOWLEDGE BASE

Calculate Difference With Cumulative Total


Published: 02 Jun 2022
Last Modified Date: 03 Jun 2022

Question

How to calculate the remainning product numbers to be shipped based on the information of Order Quantity and Shipment Quantity?
 

Environment

  • Tableau Desktop

Answer

1. Create the following calculation field Numbers to be shipped
SUM([Order Quantity])-WINDOW_SUM(SUM([Shipment Quantity]),FIRST(),0)

2. Computes the above table calculation field within the dimension Ship Date.
User-added image
3. Add Numbers to be shipped to the view
Did this article resolve the issue?