Skip to main content
Community site session details

Community site session details

Session Id : RwQ5apD/k5R+OF9RvNPcyp
Power Apps - Power Query
Answered

Compare Duplicate Row Contents

Like (0) ShareShare
ReportReport
Posted on 29 Oct 2023 18:26:50 by 8

I have a spreadsheet that contains the change history of various documents.

It may happen that the title or the name of the document changes. However, the document number remains the same.

I'm looking for a way (in power query) to mark or see the documents where the name or title has changed.

The table has the following structure:

RowDocument numberTitleNameDate of change
1000.001AbcXyz01.01.2020
2000.001AbcdXyz02.01.2020
3000.002AbcXyz03.01.2021
4000.002AbcWxyz02.01.2021
5000.003AbcXyz02.02.2022
6000.003AbcXyz02.03.2022
  • lbendlin Profile Picture
    8,111 Super User 2025 Season 2 on 30 Oct 2023 at 15:57:23
    Re: Compare Duplicate Row Contents

    Same code, just a different source.  Maybe use Table.Buffer but it may not bring much.

  • houlyhanna Profile Picture
    8 on 30 Oct 2023 at 15:32:58
    Re: Compare Duplicate Row Contents

    Hi Ibendlin,

    Okay. What would the code look like if I wanted to use it for another dataset with an extremely large number of rows?

    Thank you for your help.

     

  • lbendlin Profile Picture
    8,111 Super User 2025 Season 2 on 30 Oct 2023 at 14:08:14
    Re: Compare Duplicate Row Contents
    That is your sample data, encoded in Base64 and zipped up.
  • houlyhanna Profile Picture
    8 on 30 Oct 2023 at 12:44:19
    Re: Compare Duplicate Row Contents

    I'm curious. What does the long string of numbers at the beginning of the code mean or do? i45WM...

  • Verified answer
    lbendlin Profile Picture
    8,111 Super User 2025 Season 2 on 29 Oct 2023 at 21:22:33
    Re: Compare Duplicate Row Contents

     

    This can be done in a variety of ways. Here's one.

    let
     Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMlTSUTIwMNAzMACxHJOSgWREZRVI1FAPiIwMjAyUYnWilYzQFaYgVBqhqDSGqzRCN9IYqtAQrNAEi8LwClQjISpN4SqN0Y0EKjQCKTQCKzTDq9AYqjAWAA==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Row = _t, #"Document number" = _t, Title = _t, Name = _t, #"Date of change" = _t]),
     #"Changed Type" = Table.TransformColumnTypes(Source,{{"Row", Int64.Type}, {"Document number", type text}, {"Title", type text}, {"Name", type text}, {"Date of change", type date}}),
     #"Grouped Rows" = Table.Group(#"Changed Type", {"Document number"}, {{"Min Title", each List.Min([Title]), type nullable text}, {"Max Title", each List.Max([Title]), type nullable text}, {"Min Name", each List.Min([Name]), type nullable text}, {"Max Name", each List.Max([Name]), type nullable text}}),
     #"Added Custom" = Table.AddColumn(#"Grouped Rows", "Changed", each [Min Title]<>[Max Title] or [Min Name]<>[Max Name]),
     #"Removed Other Columns" = Table.SelectColumns(#"Added Custom",{"Document number", "Changed"})
    in
     #"Removed Other Columns"

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Telen Wang – Community Spotlight

We are honored to recognize Telen Wang as our August 2025 Community…

Announcing our 2025 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for…

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 637 Most Valuable Professional

#2
stampcoin Profile Picture

stampcoin 570 Super User 2025 Season 2

#3
Power Apps 1919 Profile Picture

Power Apps 1919 473

Featured topics

Loading complete