Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Hi has anyone managed to do the following? -
I have 200 rows, in Column A I have JOB IDs populating, when a new job populates with the same JOB ID id like the row data to join the original row.
Is it possible to add say 2 or 4 columns which only populate when the duplicate JOB ID is found?
I would then want to delete the row so that only the original row remains in the table
Thoughts?
Solved! Go to Solution.
See the logic in the M code below. Basically this:
If you need further help, please provide data per the links at the bottom of this post.
1) In Power Query, select New Source, then Blank Query
2) On the Home ribbon, select "Advanced Editor" button
3) Remove everything you see, then paste the M code I've given you in that box.
4) Press Done
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("XcjJCQAwCATAXvYteKcZsf82AhIQMs+pgoIQrGxigqaCTdiGT/gfsRETuZET50Vf", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type text) meta [Serialized.Text = true]) in type table [ID = _t, Date = _t]),
#"Changed Type" = Table.TransformColumnTypes(Source,{{"ID", Int64.Type}, {"Date", type date}}),
#"Grouped Rows" = Table.Group(#"Changed Type", {"ID"}, {{"All Rows", each _, type table [ID=number, Date=date]}}),
#"Added Custom" = Table.AddColumn(#"Grouped Rows", "Original Records", each Table.Max([All Rows], "Date")),
#"Removed Other Columns" = Table.SelectColumns(#"Added Custom",{"Original Records"}),
#"Expanded Original Records" = Table.ExpandRecordColumn(#"Removed Other Columns", "Original Records", {"ID", "Date"}, {"ID", "Date"})
in
#"Expanded Original Records"
How to get good help fast. Help us help you.
How to Get Your Question Answered Quickly
How to provide sample data in the Power BI Forum
DAX is for Analysis. Power Query is for Data Modeling
Proud to be a Super User!
MCSA: BI ReportingSee the logic in the M code below. Basically this:
If you need further help, please provide data per the links at the bottom of this post.
1) In Power Query, select New Source, then Blank Query
2) On the Home ribbon, select "Advanced Editor" button
3) Remove everything you see, then paste the M code I've given you in that box.
4) Press Done
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("XcjJCQAwCATAXvYteKcZsf82AhIQMs+pgoIQrGxigqaCTdiGT/gfsRETuZET50Vf", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type text) meta [Serialized.Text = true]) in type table [ID = _t, Date = _t]),
#"Changed Type" = Table.TransformColumnTypes(Source,{{"ID", Int64.Type}, {"Date", type date}}),
#"Grouped Rows" = Table.Group(#"Changed Type", {"ID"}, {{"All Rows", each _, type table [ID=number, Date=date]}}),
#"Added Custom" = Table.AddColumn(#"Grouped Rows", "Original Records", each Table.Max([All Rows], "Date")),
#"Removed Other Columns" = Table.SelectColumns(#"Added Custom",{"Original Records"}),
#"Expanded Original Records" = Table.ExpandRecordColumn(#"Removed Other Columns", "Original Records", {"ID", "Date"}, {"ID", "Date"})
in
#"Expanded Original Records"
How to get good help fast. Help us help you.
How to Get Your Question Answered Quickly
How to provide sample data in the Power BI Forum
DAX is for Analysis. Power Query is for Data Modeling
Proud to be a Super User!
MCSA: BI ReportingThis is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
9 | |
9 | |
8 | |
6 | |
6 |