Forum Discussion
Raaassotto
Helper I
4 years agoSum for top dates in table
Please help to make a dax function to sum sales for the top latest 3 dates. For every seller latest dates could be different.
| Seller | Date | Sales,$ |
| John | 01.02.2021 | 50000 |
| John | 02.02.2021 | 20000 |
| John | 03.02.2021 | 35000 |
| John | 04.02.2021 | 65000 |
| John | 05.02.2021 | 25000 |
Hi Raaassotto ,
You can try this measure:
Sales 2 = CALCULATE(SUM('Table'[Sales,$]),TOPN(3,'Table','Table'[Date],DESC))Result:Jori
If I answered your question, please mark it as a solution to help other members find it more quickly.
Connect on Linkedin
2 Replies
- jppv20
Solution Sage
Hi Raaassotto ,
You can try this measure:
Sales 2 = CALCULATE(SUM('Table'[Sales,$]),TOPN(3,'Table','Table'[Date],DESC))Result:Jori
If I answered your question, please mark it as a solution to help other members find it more quickly.
Connect on Linkedin - Raaassotto
Helper I
jppv20 it works! thanks!