Pivot Table Assistance - Cascading formula's within the same Employee ID with multiple Employee ID's

Copper Contributor

We have a pivot table of multiple employee IDs that we are trying to calculate (cascading down) one amount  minus another amount (both amounts are in columns in the pivot table), but only want to cascade per employee ID

3 Replies

@TanyaRuyle 

Perhaps you may illustrate on the sample, it's not clear what is same ID with multiple ID and what exactly to calculate.

@Sergei Baklan 

Let me know if you can see the image below.  This is an example of what I need under Column E

TanyaRuyle_0-1596732180164.png

 

@TanyaRuyle 

Not sure I understood how you PivotTable was built. However, for such sample

image.png

add data to data model creating PivotTable and create a measure (in PowerPivot or by Add Measure interface) as

image.png

formula is

Calculation:=CALCULATE(AVERAGE(Table1[Payment]),FILTER(ALL(Table1[DCD]),Table1[DCD]<=MAX(Table1[DCD])))-
                        CALCULATE(SUM(Table1[Due]),FILTER(ALL(Table1[DCD]),Table1[DCD]<=MAX(Table1[DCD])))