Forum Discussion

Atinder's avatar
Atinder
Icon for Helper III rankHelper III
3 years ago
Solved

Find Last purchase cost

Hello,    I am need to Find my last invoiced purchased price and last Invoiced date. If there is no invoice leave it blank . I found the last invoice date with measure.  Date of Invoice = LASTDAT...
  • Anonymous's avatar
    Anonymous
    3 years ago

    Hi Atinder ,

     

    Check the formulas:

    last_date = CALCULATE(MAX('Purchase Rec'[Date Invoiced]),ALLEXCEPT('Purchase Rec','Purchase Rec'[Sku]))
    
    last cost = CALCULATE(MAX('Purchase Rec'[COST]),FILTER(ALLEXCEPT('Purchase Rec','Purchase Rec'[Sku]),'Purchase Rec'[Date Invoiced]=[last_date]))

     

    Best Regards,

    Jay