cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
jonclay
Helper IV
Helper IV

DAX measures to find financial amount of the latest transaction per contact/customer

Hi all
I've created a DAX Measure as follows to SUM together the total of 3 fields:

Nett = SUM(transaction[dc1amount]) + SUM(transaction[dc2amount]) + SUM(transaction[dc3amount])

I've then create another DAX Measure to find the latest date of my Transactions. This has then been put into a table against various contacts so that it effectively finds the date of the latest Transaction per contact/customer:

Latest_Gift_Date =
MAXX (
    FILTER (
        transaction,
        transaction[status] = "Paid"
    ),
    transaction[dateofpayment]
)

What I'm trying to do next (and failing!) is to find the amount of the latest Transaction per contact/customer. Could anyone please supply me with the correct DAX for this based on the two measures shown above?

Many thanks
Jon 



1 ACCEPTED SOLUTION
HoangHugo
Solution Specialist
Solution Specialist

Hi, try this

measure

Latest_transaction = CALCULATE([Nett measure],transaction[dateofpayment]=[Latest_Gift_Date])

View solution in original post

2 REPLIES 2
jonclay
Helper IV
Helper IV

Hi @HoangHugo 

Thank you so much, that works fine!

Best wishes
Jon

HoangHugo
Solution Specialist
Solution Specialist

Hi, try this

measure

Latest_transaction = CALCULATE([Nett measure],transaction[dateofpayment]=[Latest_Gift_Date])

Helpful resources

Announcements
PBI Sept Update Carousel

Power BI September 2023 Update

Take a look at the September 2023 Power BI update to learn more.

Learn Live

Learn Live: Event Series

Join Microsoft Reactor and learn from developers.

Dashboard in a day with date

Exclusive opportunity for Women!

Join us for a free, hands-on Microsoft workshop led by women trainers for women where you will learn how to build a Dashboard in a Day!

MPPC 2023 PBI Carousel

Power Platform Conference-Power BI and Fabric Sessions

Join us Oct 1 - 6 in Las Vegas for the Microsoft Power Platform Conference.

Top Solution Authors