Help with Date portion of GETPIVOTDATA formula

ExcelAtEverything

Active Member
Joined
Jan 30, 2021
Messages
351
Office Version
  1. 2019
Platform
  1. Windows
Hello,

I have a project I'm working on and I am now in the Month To Date (MTD) section, and am running into a problem setting up a formula which will always grab the MTD number of the current month (which are the numbers that appear in the Pivot Table below). The Pivot table was built using Power Query & loaded into Data Model. The MTD number needs to be based on the entire month of whatever yesterday's date was, so that on days like today (1st of the month), the sheet shows the month of March. The formula will also need to work so that I can pull it down and it will translate to the other Org numbers (located in the Pivot Table under "Row Labels"

This is the formula I have in G16 now, which seems to work, but I can't keep that "Mar" date info in there obviously. When I try to erase the date part of the formula however, the results grow significantly larger for whatever reason (I'm still new to Pivot Tables, so I don't understand why just yet). By the way, "Monthly Orders Reports" is just the name of the folder on my desktop holding all of the Excel docs with the info that feeds the Data Model. Thanks for assistance.
=GETPIVOTDATA("[Measures].[Sum of Line Item Total]",'MTD GS'!$B$3,"[Monthly Orders Reports].[Org #]","[Monthly Orders Reports].[Org #].&["&[@[Org '#]]&"]","[Monthly Orders Reports].[Date (Month)]","[Monthly Orders Reports].[Date (Month)].&[Mar]")
1617296251998.png

The Formula is in 'Main' Tab.
The Pivot Table is in 'MTD GS' tab.
1617294047730.png
 
Ok, perfect! I didn't realize that was already addressed in your formula. Thanks so much!
 
Upvote 0

Excel Facts

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

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