Question

Let's say I have a series of rows which look like

    date        amount  category
    2014-01-31  $10.00  fees
    2014-01-31 -$15.00  food
    2014-02-01  $5.00   donations

I want to show a graph where on the x-axis there are dates, and on the y-axis there are

  • profits, which are positive amounts, aggregated by category, as positives above
  • losses, which are negative amounts, aggregated by category, as negatives below
  • daily balance which is the sum of ALL daily profits and losses

Categories are just integers, there's about a dozen and we know which are profits and which are losses.

What are the right things to put on the shelves to achieve this, and specifically, how do I compute and show the balance?

Was it helpful?

Solution

Tableau is easy once you get used to it. Here's a brief outline of the steps to make your chart. If you don't recognize some of the terms, you may need to experiment.

Define Profit as a calculated field = max(0, amount). Define Loss similarly using min() instead of max()

Put MDY(date) on the columns shelf (try dragging with the right mouse to see options) Put Measure Values on the rows shelf Put Sum (amount), Sum(Loss), Sum(Profit) on the Measures Values shelf

Put Measure Names on the color shelf

Experiment with the "Show Me" tab, and check out the examples under the help menu, then try out the training videos at tableausoftware.com

Good luck

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top