No announcement yet.

Power Query of simple duplicate counter

  • Filter
  • Time
  • Show
Clear All
new posts

  • Power Query of simple duplicate counter

    Hi All,

    I often use this simple formula to count the number of instances of a duplicate reference number. =IF(ROW()=2,1,IF(A2=A1,B1+1,1)), so that the first instance is labelled 1, and next is labelled 2 etc

    I want to be able to replicate this in Power Query, any suggestions please.

  • #2

    Will you please attach a sample Excel workbook? We are not able to work with or manipulate a picture of one and nobody wants to have to recreate your data from scratch.

    1. Make sure that your sample data are REPRESENTATIVE of your real data. The use of unrepresentative data is very frustrating and can lead to long delays in reaching a solution.

    2. Make sure that your desired results are also shown (mock up the results manually).

    3. Make sure that all confidential data is removed or replaced with dummy data first (e.g. names, addresses, E-mails, etc.).

    4. Try to avoid using merged cells as they cause lots of problems.

    Please pay particular attention to point 2 (above): without an idea of your intended outcomes, it is often very difficult to offer appropriate advice.

    Did you debug your code first?
    FORUM RULES----->

    If someone has helped you, say "thank you" by clicking on the Like Button.