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
shuhn1229
Resolver I
Resolver I

Matrix Visual with Changing Names

Hi all,

 

I've been trying to think through a solution to this all afternoon and am drawing blanks. I have a table like the below:

 

NameDateID
Book11/1/20231
Book12/1/20231
Result13/1/20231
Book22/1/20232
Result23/1/20232
Book33/1/20233

 

I am trying to build a matrix visual where I can visualize the latest value (max date) in name per row, showing a count if that ID appeared in a given month . The problem is when I create a matrix of name by row, if the name changes I get two or more rows per ID. If I create a matrix of ID by Date is all works perfectly, but ID is meaningless for me, I really need to be able to show the row name as the max value per date, with a record of each of the dates in aggregated by ID.

 

I've tried doing some summary tables but can't quite get this to look right. Am I overthinking it?

 

Thanks!

1 ACCEPTED SOLUTION

Hi,

This calculated column formula works

Column = LOOKUPVALUE(Data[Name],Data[Date],CALCULATE(MAX(Data[Date]),FILTER(Data,Data[ID]=EARLIER(Data[ID]))),Data[ID],Data[ID])

Hope this helps.

Untitled.png


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

View solution in original post

5 REPLIES 5
amitchandak
Super User
Super User

@shuhn1229 , Try Measure like

Last ID = Var _max = maxx(filter( ALLSELECTED(Data1), Data1[Name] = max(Data1[Name]) ),Data1[Date])
return
CALCULATE(Max(Data1[ID]), filter( (Data1), Data1[Name] = max(Data1[Name]) && Data1[Date] =_max))

 

 

Latest
https://amitchandak.medium.com/power-bi-get-the-last-latest-value-of-a-category-d0cf2fcf92d0

https://amitchandak.medium.com/power-bi-get-the-sum-of-the-last-latest-value-of-a-category-f1c839ee8...

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Hi,

 

thank you so very much for your help. I was thinking this through further and think it might be easier in this case if I could create a calculated column that would 1) filter by ID 2) filter by latest possible date 3) return the Name column. Could you walk me through how to set this up? This way I'd be able to use the Name column for each row in the matrix.

Hi,

This calculated column formula works

Column = LOOKUPVALUE(Data[Name],Data[Date],CALCULATE(MAX(Data[Date]),FILTER(Data,Data[ID]=EARLIER(Data[ID]))),Data[ID],Data[ID])

Hope this helps.

Untitled.png


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

you are brilliant. thank you.

You are welcome. Thank you for the kind words.

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

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!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

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