0
votes

I am having an issue with how to get excel's powerpivot to calculate the most recent score with UPDATING and historical data. Suppliers are audited multiple times over the years the score changes and I need the powerpivot to count only the most recent score.I have created a powerpivot to show this data and right now I have the count of # of suppliers with risk score 1,2,3,etc. But say supplier ABC is audited in 2011 with a 1 and 2012 with a 2. I need the pivot to count only the most recent score (the 2) so that the count of number of suppliers isn't counting the same supplier twice. This sounds super confusing but basically I need it to calculate the max score from the latest DATE of the audit and then return that back to a pivottable. Hope that helps clarify my question. I have attached pictures to try to illustrate. The max audit score is not what I want but someone gave me that code to try and I was trying to modify it.

enter image description here

1

1 Answers

0
votes

The max date seems correct. So you only need to a measure.

=CALCULATE(countrows(myTable),filter(ALLSELECTED(myTable)
,myTable[Audit Date]=max(myTable[LatestAuditDate])))