Forum Discussion

Raaassotto's avatar
Raaassotto
Icon for Helper I rankHelper I
4 years ago
Solved

Sum 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. 

SellerDateSales,$
John01.02.202150000
John02.02.202120000
John03.02.202135000
John04.02.202165000
John05.02.202125000
  • 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's avatar
    jppv20
    Icon for Solution Sage rankSolution 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