Pulling a previous-quarter average for income statement only

DWig

Board Regular
Joined
Sep 26, 2012
Messages
77
Hello again. I'm looking to create a measure that gives me the previous quarter's average general ledger activity for income statement accounts only (account 3000 and higher).

I managed to get the average activity, but it's not excluding the balance sheet accounts (account 1000-2999) when I apply a filter. I'm a little confused, because it actually doesn't seem to have any effect at all. It seems like if I built this incorrectly, it would cause an error. :confused:

This is my equation:

=(calculate([MonthlyActivity],PREVIOUSQUARTER(FinancialPeriod[FinancialPeriod]),GLAccounts[GLAccount_Code]>=3000)/3)

The reason I want to exclude the balance sheet is so I can look at the average amounts for net income (sum total of all income statement activity) and use that as a sanity check.

If possible, I'd also like to incorporate a TODAY() piece so it automatically updates itself once a quarter, rather than having to feed it a date.
 

Excel Facts

Control Word Wrap
Press Alt+Enter to move to a new row in a cell. Lets you control where the words wrap.
I forgot to explain: MonthlyActivity is another measure that's just (sum([Debit])-sum([Credit]))
 
Upvote 0
I figured out the first piece. The comparative GL account "3000" needed to be in quotes. That makes the base function work. Still working on the TODAY() piece.
 
Upvote 0
I figured out the second piece. All the financial periods in our GL software use the 1st of the month as the standard date for the financial period (hence, why the date value is 1 rather than a third TODAY function).

Final code is this:

=(calculate((sum([Debit])-sum([Credit])),PREVIOUSQUARTER(filter(all(FinancialPeriod[FinancialPeriod]),FinancialPeriod[FinancialPeriod]=date(year(today()),month(today()),1))),GLAccounts[GLAccount_Code]>="3000")/3)
 
Upvote 0

Forum statistics

Threads
1,223,993
Messages
6,175,845
Members
452,675
Latest member
duongtruc1610

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