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
emkane
Helper I
Helper I

Replacing ranked values with values from another table over time.

Hello Everyone,

I am not sure if this can be done, but I am trying to show the median age of the units at a future date knowing that some units will be replaced over time. My data looks like the example below, the age is calculated from the build date. The units to be demoed should be the oldest units at the time. I suspect I need to rank the age of the units and then remove the top n values (number to be demoed) and then add the build units with the year as the build date. I also suspect I will need to create a table representing each unit to build with a new unit ID and year built date.

 

image001.png


Thanks for the help.

2 REPLIES 2
v-eachen-msft
Community Support
Community Support

Hi @emkane ,

 

I probably understand what you mean. You want to remove the oldest ones ( demo ) and add new ones ( build ) based on the year. The new ones' ages start form 0, right? But how to define the new UnitID?

 

Community Support Team _ Eads
If this post helps, then please consider Accept it as the solution to help the other members find it.

Hi @v-eachen-msft ,

Correct, 

 

In 2025 Area-1 loses 2 of the 60-year-old units and gains 2 new units, Area-3 loses 5 80-year-old units and gains 5. Age would be calculated with a DateDiff function. 

 

I am thinking my Change table should really be two tables, a demo table and a new unit table that looks like:

DemoDate     Location     UnitsToDemo

1/1/2025        Area-1        2

1/1/2025        Area-3        4

 

BuildDate    UnitID
1/1/2025     NewArea1-1

1/1/2025     NewArea1-2

1/1/2025     NewArea3-1

1/1/2025     NewArea3-2

1/1/2025     NewArea3-3

1/1/2025     NewArea3-4

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