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

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

Reply
Anonymous
Not applicable

Get the most recent value with multiple filters

I'm looking to create a report where I can get the most recent selling price and unit cost of each item by department , customer & brand. I just require the value & not the aggregate. 

 

For eg. Brand A has 3 products in Department A and the last Prod x was sold on 28th , Prod y sold on 29th and Prod z sold on 22nd. 

I have attached the sample dataset below with the desired outcome. 

https://docs.google.com/spreadsheets/d/1vaM-SyZSevNx5oUkvk3xwivwB-J_KuPZ/edit?usp=drive_link&ouid=10... 

1 ACCEPTED SOLUTION

@Anonymous 

here is a workaround for you

create a new column

_maxdate = 
 if(CALCULATE(max('Table'[Date_]),ALLEXCEPT('Table','Table'[Item Name],'Table'[Customer Name]))='Table'[Date_],"Y")

11.PNG

then you create a matrix and add a filter to select column is Y

22.PNG

 

pls see the attachment below





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

Proud to be a Super User!




View solution in original post

8 REPLIES 8
ryan_mayu
Super User
Super User

@Anonymous 

the file has been deleted. pls try to upload.





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

Proud to be a Super User!




Anonymous
Not applicable

I have updated the link. Thanks.

@Anonymous 

what's the expected output

e.g. there are three rows for soda of hyper marrket. What's the calculation logic?

11.PNG





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

Proud to be a Super User!




Anonymous
Not applicable

The most recent one . You can change the date of the last one cause I have edited the original data as I cannot share the original data.

@Anonymous 

here is a workaround for you

create a new column

_maxdate = 
 if(CALCULATE(max('Table'[Date_]),ALLEXCEPT('Table','Table'[Item Name],'Table'[Customer Name]))='Table'[Date_],"Y")

11.PNG

then you create a matrix and add a filter to select column is Y

22.PNG

 

pls see the attachment below





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

Proud to be a Super User!




Anonymous
Not applicable

Thank you I appreciate it !

you are welcome





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

Proud to be a Super User!




Anonymous
Not applicable

In my data the selling price is blank at the most recent transaction as the item is given free of charge. Is there a calculation that I can use to get LASTNONBLANKVALUE of the selling price?

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

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.