Loading

How To Calculate A Measure Based On The Accumulation Of Other Measures

Дата публикации: Jul 14, 2025
Задача

How to calculate the stock numbers of each day based on the numbers of purchase, sales and shipment?
*stock numbers=purchase numbers -sales numbers -shipment numbers 

Действия
1. Create a calculation field [Stock] as the following:
(zn(SUM([Purchase]))-zn(SUM([Sales]))-zn(SUM([Shipment])))+PREVIOUS_VALUE(0)

2. Drag dimension [date] to Rows, set it to MDY(date)
3. Drag [Stock] to Text
4. Edit Table Calculation to Compute Using Month, Day, Year of date
Дополнительные ресурсы

For more information for Table Calculations, please see: https://help.tableau.com/current/pro/desktop/en-us/calculations_tablecalculations_quick.htm

Номер статьи базы знаний

001456693

Вложения

Quantity in stock.twbx

24 KB

 
Загрузка
Salesforce Help | Article