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
Stephanie-curno
Regular Visitor

Help with a calculated column (lookup function?)

Good morning, 

 

I have a table (Product_Structure) that contains repeat part number combinations (Parent Part + Child Part) because it esentially keeps a log of all the times the part number pairing was entered as well as the data for the part number pairing at that time. From this table, I only want to use the most recent data for the part pairing because that is the only data that is relevant. Each 'Parent Part" has several "Child Part" numbers, this is ok. 

 

I want to make it so that each parent part and child part pairing is only used once in the table. This gets tricky because I want to make sure that the pairing used is the most recent pairing. I would need to be able to connect the most recent pairing's child part number to a part number from another table. I would also need to refresh this table in the future and have it update appropriately. I have attached the two tables for reference. 

Stephaniecurno_1-1711379400516.pngStephaniecurno_2-1711379465962.png

I have also attached an example of a repeat pairing that I would only want the most recent entry from (06/01/2023). Is someone able to tell me how I could create a column or some type of data filter/transformation to get the results I am looking for?

5 REPLIES 5
Stephanie-curno
Regular Visitor

Stephaniecurno_1-1711487063751.png

 

For reference the above is the table. I created a merged column which I think may help. There are multiple duplicates of the values in the merged column, but I only want the most recent instance to show up in the table (based on modification date). What is hard is I need to be able to refresh this table and have it automatically update. 

Ashish_Mathur
Super User
Super User

Hi,

Share some data to work with and show the expected result.


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

@Stephanie-curno 

you can try this

Column = if( CALCULATE(max('Table'[creation date]),ALLEXCEPT('Table','Table'[parent part],'Table'[child part]))='Table'[creation date],1,0)
11.PNG
 




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

Proud to be a Super User!




Greg_Deckler
Community Champion
Community Champion

@Stephanie-curno Maybe this: (2) Lookup Min/Max - Microsoft Fabric Community

Otherwise, Sorry, having trouble following, can you post sample data as text and expected output?
Not really enough information to go on, please first check if your issue is a common issue listed here: https://community.powerbi.com/t5/Community-Blog/Before-You-Post-Read-This/ba-p/1116882

Also, please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490

The most important parts are:
1. Sample data as text, use the table tool in the editing bar
2. Expected output from sample data
3. Explanation in words of how to get from 1. to 2.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Stephaniecurno_1-1711487063751.png

 

For reference the above is the table. I created a merged column which I think may help. There are multiple duplicates of the values in the merged column, but I only want the most recent instance to show up in the table (based on modification date). What is hard is I need to be able to refresh this table and have it automatically update. 

 

 

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.