Data for a Cause
October 6, 2016
Want to create a profit and loss chart in Tableau? It's easier than you might think!
Using the Superstore data, I want to show year over year changes in sales, by state. I add State to the Columns shelf, Order Date to the Rows shelf, and Sales to Text Marks Card.
A profit and loss chart requires a year over year difference calculation. It’s not present in the data, but it’s easy to create one with Tableau.
Right click on Sales and select Quick Table Calculation > Difference. Now we have the difference in sales by state.
To turn this table into a profit and loss chart in Tableau, we need to do a few things.
First, drag the the difference in sales by state calculation to the Rows shelf to represent the data with bar charts.
Then, hold the Ctrl key and drag the the difference in sales by state calculation to Color Marks Card. Click on Color Card and select Edit. Set the color to be Red-Green Diverging with 2 steps.
That's it! You have your profit and loss chart!
Check out how to create a similar Tableau visualization: a Waterfall chart. And don't forget to subscribe below for more Tableau tips and tricks.
profit and loss chart in Tableau
Visualize to persuade and inspire action
How to create a waterfall chart in Tableau
How to overlay maps in Tableau
How to create an org chart in Tableau
Which Tableau certification is right for you?
Current Period Vs Previous Period Comparison in Tableau
Winners of the 16th Data for a Cause challenge
Visualizing Global Peace Gap
Winners of the 15th Data For A Cause Challenge
growth marketing (4)
content marketing (3)
product development (1)
Data for a Cause (39)