Forum Discussion
RemiAnthonise
Helper V
8 years agoCalculate SUM where Date = MAX
Hi guys, I couldn't find the right answer, maybe you can help me. I've got a table, see image below. It's possible that salary, bonus etc gets updated so I want to calculate with the most rec...
- 8 years ago
Hello RemiAnthonise,
This can be restructured as:
Salaris = [Factor opslag] * CALCULATE(SUM(WorkerPositionEarningCodes[Amount]); WorkerPositionEarningCodes[EarningCodeId] = "Salaris"; FILTER(WorkerPositionEarningCodes,WorkerPositionEarningCodes[ValidFrom]=MAX(WorkerPositionEarningCodes[ValidFrom])))
Hope this works.
Regards.
rajulshah
Resident Rockstar
8 years agoHello RemiAnthonise,
This can be restructured as:
Salaris = [Factor opslag] * CALCULATE(SUM(WorkerPositionEarningCodes[Amount]); WorkerPositionEarningCodes[EarningCodeId] = "Salaris"; FILTER(WorkerPositionEarningCodes,WorkerPositionEarningCodes[ValidFrom]=MAX(WorkerPositionEarningCodes[ValidFrom])))
Hope this works.
Regards.
RemiAnthonise
Helper V
8 years agoThankks rajulshah ! I'm happy with the result.