Using SUMIF to calculate Current Month - on Pivot Table (OLAP)

hierosir

New Member
Joined
Jun 17, 2015
Messages
4
Hi guys,

Thank you all in advance for even taking the time to read this. I appreciate it.

Here is a table that comes from an OLAP analysis server:

HnXnVXm.png


I need to have on a "dashboard" else where a field that will show the "Current Month's" acquisitions (you see them in Row 22, in Grand Total row). Additionally, I'll need a "Previous Month" figure.

This is what I have currently for "Current Month":

=SUMIF('Data Acq'!C1:NC1,">="&DATE(YEAR(TODAY()),MONTH(TODAY()),1),'Data Acq'!C25:NC25)-SUMIF('Data Acq'!C1:NC1,">"&DATE(YEAR(TODAY()),MONTH(TODAY())+1,1),'Data Acq'!C25:NC25)

It returns a "0" value, I just can't figure out why.

Thanks for your help,

Cheers,

Hierosir
 

Excel Facts

Remove leading & trailing spaces
Save as CSV to remove all leading and trailing spaces. It is faster than using TRIM().
Hi Hierosir and Welcome to MrExcel,

A couple things to check....
1. The formula you posted references a sum_range C25:NC25, but your screen shot and description show Row 22 instead of Row 25.

2. The second part of your formula should be a "less than" symbol instead of "greater than":
"... -SUMIF('Data Acq'!C1:NC1,"<"&DATE(...."


If you have Excel 2007, consider using the SUMIFS function.

Will the location of your Grand Total row always be the same? With PivotTables, one needs to consider filtering or changes in the data that would affect the number of rows.
 
Upvote 0
Hi Jerry!

Thank you so much for responding. After reading this I went over and realized two things. a) on point 1) you made you were correct. This was a temporary error in troubleshooting it myself (had removed subtotals thus changing the pivot). Then b) I realized that I had incorrectly converted the date's running across the pivot. They're in text, as opposed to date. Converted and then finally it worked. Alll good times.

On 2. indeed you are correct - thank you for that!

Hope you're well and the week continues to kick butts for you!

-Hierosir
 
Upvote 0

Forum statistics

Threads
1,220,923
Messages
6,156,848
Members
451,385
Latest member
rlidster87

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