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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount 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
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 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