Forum Discussion

Leigh_G's avatar
Leigh_G
Frequent Visitor
5 years ago
Solved

Max Value Associated with Most Recent Date

I have a standalone table of data (no date table in model) that has one date per month/year and sales for that date.  I am trying to create a card with the most recent sales figure (which should filt...
  • Mikelytics's avatar
    5 years ago

    HI Leigh_G ,

     

    Please try the following formula which gives you the number of the last date. I tried it with the following data set.

     (my table name was t_7)

     

     

    SUM_SALES_LAST_MONTH =
    CALCULATE(
    Sum(t_7[Sales]),
    FILTER(t_7,t_7[Date]=MAX(t_7[Date])
    )
    )
     
    P.S. The formula name SALES_LAST_DATE would fit better to what it does 🙂 but in the end this is what should work for what you requested.
     
    Best regards
    Mikelytics
     
    Did I solve your request? Please mark my post as solution.
     
    Appreciate your Kudos.