ExcelAtEverything
Active Member
- Joined
- Jan 30, 2021
- Messages
- 351
- Office Version
- 2019
- Platform
- 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]")
The Formula is in 'Main' Tab.
The Pivot Table is in 'MTD GS' tab.
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]")
The Formula is in 'Main' Tab.
The Pivot Table is in 'MTD GS' tab.