1 of 1 people found this helpful
This can be done using a calculated field similar to the following:
Depending on how your view is set up the way the calculation is being computed may need to be edited (right click on it and select Compute Using...)
Hope this helps!
Thanks a lot for the prompt response and please accept my apologies for not describing the problem accurately. The two columns in the above table are in fact from the same database field separated according to type column in the same table. So I cannot refer them individually within the Tableau sheet as in your example.
It sounds like you are describing a table structure like this:
So the number field is the only measure, and the Type field is a dimension that you use to create the cross-tab in your original post...
If so, you can still use Tracy's formula, you just need to create new measures for each type.
IF [Type] = 'IN'
IF [Type] = 'OUT'
I've attached a workbook with this info.
The only catch is the table calculation cannot run for the first row because there is "previous" row for which to get lookup information in the table.
running sum.twbx.zip 8.9 KB
I have used the tips given here and changed a little bit my workbook and it seems everything is fine now.
Thanks a lot.