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
Anonymous
Not applicable

Last Date Order

Hi, 

I tried to get the last Date of order of each Customer ID by using formular : LASTDATE()

Last Date Purchaes = LASTDATE(Orders[Order Date].[Date])

but it gave me the duplicate last date of order of each customer id. 

 

here is the result: 

duplicate last date.PNG

 

the data set using is: sample_superstore. 

 

 

Hope to hear from you. 

thanks!!

1 ACCEPTED SOLUTION

@Anonymous 

 

Yes, You can not use a MEASURE in SLICER

 

But you can add a calculated column as follows. Then use it in slicer

 

Column = CALCULATE(max(Orders[Order Date]),ALLEXCEPT(Orders,Orders[Customer ID]))

View solution in original post

4 REPLIES 4
Zubair_Muhammad
Community Champion
Community Champion

Hi @Anonymous 

 

In the picture it seems you added this formula as calculated column

 

 

Use a MEASURE instead

 

Measure = LASTDATE(Orders[Order Date])

or

Measure = MAX(Orders[Order Date])

 

 

 

Anonymous
Not applicable

Hi,

 

Thank you for your solution. 

 I works now!! 

@Anonymous 

 

Yes, You can not use a MEASURE in SLICER

 

But you can add a calculated column as follows. Then use it in slicer

 

Column = CALCULATE(max(Orders[Order Date]),ALLEXCEPT(Orders,Orders[Customer ID]))
Anonymous
Not applicable

Dear, Thank you for your solution. 

I can use slicer now. but one thing happen is the user id is duplicated. 

 

I dont know why. Could you help me to check it, please? 

duplicate last date.PNG

Here is the sample file that I use. 

https://we.tl/t-56Q7qWkro5

Thanks and hope to hear from you!! 

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

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!

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
Top Kudoed Authors