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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

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
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors