Forum Discussion

stubb525's avatar
stubb525
Copper Contributor
Oct 19, 2022

Complicated Pivot Table Issue With SUMIF like logic.

Alright since I am a new user I can't upload pics. 

 

This is a sample set of data: 

 

Funding is cumulative throughout the year and not particular to one month. So if it is 2022-03 Funding is 20 for MGMT and not 15. The larger data set has multiple Units for same dates in different rows as shown in a few examples in the sample set. Now in the pivot table, unfiltered the values for funding are correct since they are overall sums of funding for entire time frame 01-12. If I filter by date I only return the funding for that month instead of a summation of every month before that as well. So If I pick 2022-04 from the date slicer My funding in the pivot table should be  MGMT funding: 20 Power Funding: 95 and Sales Funding: 90  but instead I get MGMT: 0 POWER: 20 SALES funding: 80. Is there any way to calculate this in power query, power pivot, etc in order to get this type of field. 



UnitDateFunding$Sales    
MGMT2022-01555    
SALES2022-02105    
MGMT2022-0315302 ROW LABELSSUM SALESSUM FUNDING
POWER2022-0420439 
MGMT2022-0525203 MGMT10843190
SALES2022-0630604 POWER3960210
MGMT2022-0735402 SALES2365280
SALES2022-0840405 
MGMT2022-09459532    
SALES2022-1050349    
POWER2022-11552021    
POWER2022-1260607    
MGMT2022-0165349    
SALES2022-0270768    
POWER2022-0375893    
SALES2022-0480234    
  • alannavarro's avatar
    alannavarro
    Iron Contributor

    stubb525 

     

    Hello, I tried to do it with power query. Attached is the file... it could fail if it contains data for more than one year...

     

    I think this should be easier with an excel formula maybe a sumifs or something to create the ytd column.

Resources