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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
WolfDog23
Frequent Visitor

Need help use only the latest run's data, not a collection of all the individual runs.

Hi, I'm having an issue trying to figure out how to only capture information (Quantity) from our current running "LEG" for an "ID Number". II created a example to try and simplify how our database is set up. What I want to grab is the highest/most current LEG and display how many parts are "Running" today. Based on my current setup, I'm using my Status "Running" as the limiting factor as most LEG's are 1. It currently set up as an IF statement to create a new column only using data from the Quantity column and creating a new column with that data. However, sometimes we have instances were certain ID Numbers have more than one LEG. In this instance, the status for all legs will be "Running" which will result in data grabed from each run instead of only the most recent. If it's easier I do have a date column I could use to extract the most recent data, but I think the LEG number should work just the same. In the example below. 

Starting data

WolfDog23_0-1692718065133.png

Info needed

WolfDog23_1-1692718158990.png

 

 

1 ACCEPTED SOLUTION
Syk
Super User
Super User

1) Duplicate your table. You should have 2 tables, pick one to start with (I'm starting with the original table).
2) Under Transform > Group by > fill out the UI like this

Syk_1-1692721495027.png

(If you have more statuses and only want running, do that filter before this step)

3) Under Home > Merge Queries > select your duplicated table to merge and select both ID Number and LEG (hold ctrl and click to select multiple) for each of the tables.

Syk_2-1692721756781.png

4) Expand your merged table

Syk_3-1692721792997.png

and

Syk_4-1692721807245.png

 

 

 

View solution in original post

1 REPLY 1
Syk
Super User
Super User

1) Duplicate your table. You should have 2 tables, pick one to start with (I'm starting with the original table).
2) Under Transform > Group by > fill out the UI like this

Syk_1-1692721495027.png

(If you have more statuses and only want running, do that filter before this step)

3) Under Home > Merge Queries > select your duplicated table to merge and select both ID Number and LEG (hold ctrl and click to select multiple) for each of the tables.

Syk_2-1692721756781.png

4) Expand your merged table

Syk_3-1692721792997.png

and

Syk_4-1692721807245.png

 

 

 

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 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.