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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
darshaningale
Resolver II
Resolver II

How to take highest value of text column in subtotals in matrix.

I have the below data.

Order ProductOrder Date
1P19-Oct
1P210-Oct
1P38-Oct
2P49-Oct
2P58-Oct

 

I want to show the Product which is present in the row where the date is latest.

 

Result

Order ProductOrder Date
1P210-Oct
2P49-Oct

 

1 ACCEPTED SOLUTION
Ashish_Mathur
Super User
Super User

Hi,

You may download my PBI file from here.

Hope this helps.

 Untitled.png


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

View solution in original post

11 REPLIES 11
Ashish_Mathur
Super User
Super User

Hi,

You may download my PBI file from here.

Hope this helps.

 Untitled.png


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Thank you @Ashish_Mathur ..the solution works fine..

We have to make one measure for farthest date.

and another one for the product column to select the product of the farthest date.

You are welcome.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

@Ashish_Mathur the link doesnt work for me.

Hi,

It works just fine.  Please try agin.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

@Ashish_Mathur i got it now..seems to be a VPN problem at my side..I need to install the latest version of PBI..so it will be a while I will get back to you.

Anonymous
Not applicable

Hi @darshaningale 

Create a column

_Selected =IF('table'[Order Date] =  CALCULATE(MAX('table'[Order Date]), ALLEXCEPT('table','table'[Order])),1,0)

 

And while displying the result filter the result on _selected to have 1.

@Anonymous we do not want to filter any data here..we just want to consider latest value of order date and show that product in subtotals.

Anonymous
Not applicable

HI @darshaningale 

The code will do as mentioned in the intial ask you have posted.

Maybe elaborate your ask more to get the exact solution.

VijayP
Super User
Super User

@darshaningale 

Your question is not clear

in case of P1 also of 9 oct then how to categorise only P4 as 9 Oct. any logic behind it?




Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
MY Blog || My YouTube Channel || Connect with me on Linkedin || My Latest Data Story - Ageing Analysis

Proud to be a Super User!


@VijayP I have listed only the date part here..the actual data contains time part also.

if we have same timestamp , it should take alphanumeric ascending order of Product column.

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.