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

Easy bullets in Excel
If you have a numeric keypad, press Alt+7 on numeric keypad to type a bullet in Excel.

Forum statistics

Threads
1,214,919
Messages
6,122,260
Members
449,075
Latest member
staticfluids

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