Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
AwaisAnwar
Frequent Visitor

Getting last record of table for each customer Power bi

I have a transections table for sales record, i want to get customer wise last row record. How can i do in dax? P.S it is not intended to get latest purchase date of customer. I need full row of table
1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @AwaisAnwar ,

Please try the following methods and check if they can solve your problem:

1.Create the simple table.

vjiewumsft_0-1710841195732.png

2.Create the new measure to filter.

 

 

Last Record = 
VAR Record_Customer = CALCULATE(
    MAX('Table'[Date]),
    ALLEXCEPT('Table', 'Table'[customer])
)
RETURN
IF(MAX('Table'[Date]) = Record_Customer, 1, 0)

 

 

3.Drag the measure into the Filters pane and set the show items is 1.

vjiewumsft_1-1710841232980.png

4.The result is shown below.

vjiewumsft_2-1710841239798.png

 

Best Regards,

Wisdom Wu

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi @AwaisAnwar ,

Please try the following methods and check if they can solve your problem:

1.Create the simple table.

vjiewumsft_0-1710841195732.png

2.Create the new measure to filter.

 

 

Last Record = 
VAR Record_Customer = CALCULATE(
    MAX('Table'[Date]),
    ALLEXCEPT('Table', 'Table'[customer])
)
RETURN
IF(MAX('Table'[Date]) = Record_Customer, 1, 0)

 

 

3.Drag the measure into the Filters pane and set the show items is 1.

vjiewumsft_1-1710841232980.png

4.The result is shown below.

vjiewumsft_2-1710841239798.png

 

Best Regards,

Wisdom Wu

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

audreygerred
Super User
Super User

You can create a DAX table to achieve what you are looking for. Here is a link to SUMMARIZE DAX function: SUMMARIZE function (DAX) - DAX | Microsoft Learn





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors