Hi Marco,
Thought this would be the solution for the same last non empty question I asked you on your site, but it still doesn't work. Are you sure that your example gets the LAST value for each Product subcategory and not just the LAST value for the Product
subcategories for the date context of the pivot?
For example, when I use your approach to aggregate the last value for each account as per the following DAX, I get the same result as SUM(EndingRemainingPrincBalance) at the day level. And not sure what is happening at the higher levels, i.e. week, month,
quarter, year, but it looks like it's getting all of the last date amounts for that period ONLY if the account had a transaction in that period. I need the last transaction prior to the context period, not just limited to that period.
Russo:=SUMX (
VALUES ( DimAccount[CPAccountID] ),
CALCULATE (
SUM ( vwCPAccountRevenueRecognition[EndingRemainingPrincBalance] ),
LASTNONBLANK (
DimDate[FullDate],
CALCULATE ( COUNTROWS ( vwCPAccountRevenueRecognition ) )
)
)
)