6 Replies Latest reply on Aug 4, 2017 11:00 AM by Jayson Osmars

# Calculating Grand total difference for Profit and Loss Statement

Hello,

I am working on a Profit and Loss Statement dashboard.  Because Revenues are credits (negative values), I changed these numbers in the source excel sheet to show as a positive value in order to show correctly on the dashboard.  Expenses are naturally positive values.  So when I use the Grand total, it will sum Revenues + Expenses.  I would simply like to have the Grand Total (Net Income/Loss) show the difference between Revenues and Expenses.  Is there a simple way to have the Grand Total in Tableau accomplish this?

Thank you,

Nate

• ###### 1. Re: Calculating Grand total difference for Profit and Loss Statement

Hello Nathan,

I don't know about your data set. If these are two different dimension then you can create a calculated field as revenue-expense.

TG

1 of 1 people found this helpful
• ###### 2. Re: Calculating Grand total difference for Profit and Loss Statement

Hi TG,

Thank you for your response.  Unfortunately my Revenue and Expenses are only under one dimension.  I made a sample workbook to show this but I'm still trying to figure out how to attach it here.  How do I share the file here?

Nathan

• ###### 3. Re: Calculating Grand total difference for Profit and Loss Statement

Hello Nathan,

Request you to please share sample data set.

If you data set is like below snapshot then you can use create two calculated fields as below:

Revenue = IIF([Type]='Revenue',Cost,0)

Expenses = IIF([Type]='Expenses',Cost,0)

TG

1 of 1 people found this helpful
• ###### 4. Re: Calculating Grand total difference for Profit and Loss Statement

TG,

My data set is similar to the snapshot you show above.  I created the two calculated fields for Revenue and Expenses and then created an additional calculated field for Revenue - Expenses and used this field to replace my current "cost" Measure in the dashboard.  That solved my issue.  Thank you!

As I noted above, I cannot figure out how to share/attach a sample data set.  How do I do this?  I'm sure it is easy but I don't see any "attachment" icon to attach and upload sample files.

Thanks again for your help!!  Very appreciated.

Nate

• ###### 5. Re: Calculating Grand total difference for Profit and Loss Statement

Hello Nate,

That's great its work for you. Refer the given link to know how to attach a file.

TG

• ###### 6. Re: Calculating Grand total difference for Profit and Loss Statement

Good job solving it.