Adding row to pivot table (difference between 2 rows)

tommyts

New Member
Joined
Dec 19, 2008
Messages
19
I'm really only starting to use DAX, and I've scoured the web for an easy-to-understand solution to this problem, but can't find a suitable resolution. As you can see below, I have all the data for a Profit/Loss statement, but want to perform certain calculations (such as Gross Profit) and place it in it's proper position on the pivot table (as a ROW, not a column). The data model/table is simple, with the columns: Account Class/ Sub-class/ Month/ Value.
There are additional items under each Account Class, such as you see under 'c-Expense' (also for instance, if you clicked 'b-Cost of Goods Sold', you would see Payroll, T&E, and many other accounts).

I tried a few different things, such as Calculated Field and also a Calculated Column, but can't get Gross Profit to show as a row in the pivot table... only as a column. I implore you, masters of PowerPivot, to offer your advice and share your genius so that I, too, may one day become as you! Seriously though, I'd really appreciate it.

[TABLE="width: 328"]
<colgroup><col><col></colgroup><tbody>[TR]
[TD]Account Class/sub-class[/TD]
[TD="align: right"]Jan-15[/TD]
[/TR]
[TR]
[TD]a-Income[/TD]
[TD="align: right"]500[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]b-Cost Of Goods Sold[/TD]
[TD="align: right"](200)[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]Gross Profit - here = 300[/TD]
[/TR]
[TR]
[TD]c-Expense[/TD]
[TD] [/TD]
[/TR]
[TR]
[TD] General & Administrative[/TD]
[TD="align: right"](50)[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD] Research & Development[/TD]
[TD="align: right"](50)[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD] Sales & Marketing[/TD]
[TD="align: right"](50)[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]c-Expense Total[/TD]
[TD="align: right"](150)[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Net Income/(Loss)[/TD]
[TD="align: right"]150[/TD]
[/TR]
</tbody>[/TABLE]
 

Excel Facts

Get help while writing formula
Click the italics "fx" icon to the left of the formula bar to open the Functions Arguments dialog. Help is displayed for each argument.
My buddy Derek gave an amazing presentation on accounting reports that you should find helpful. Hell, everyone should... it's really, really good.

https://www.youtube.com/watch?v=ojHZkWkEY7Q

If you need to reach out to him, I'll put you in touch.


Scott....thank you, thank you, thank you! ...Not only for the excellent link (exactly what I needed!), but also for the prompt reply! I should've known better to come here first for guidance and advice, rather than to waste hours searching for a solution. I'll be watching that presentation a couple more times no doubt.

-Tom
 
Upvote 0

Forum statistics

Threads
1,223,243
Messages
6,170,971
Members
452,371
Latest member
Frana

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top