You can create running totals very easily with a table calculation that will sum the numbers going down the columns. If you switch the sorting, you will still get running totals going downward. What if you want to sort your data newest to oldest and have the running total calculated bottom to top? You can also do this with table calculations. if (tbTotalTextbox != null) tbTotalTextbox.Text = _runningtotal.ToString(); Now anywhere else in your code you have a decimal variable you can work with, instead of constantly converting your Textbox.Text for every calculation
Oct 30, 2018 · Table calculations are at the core of Tableau, and they solve many common calculation problems. The most common calculations like running total, moving average, change from prior period, and Year-to-Date are available as “quick” table calculations, meaning Tableau will write the formula for you.