# Removing Duplicates in PowerBI before creating new Rows in a DataSet

**URL:** <https://community.make.com/t/removing-duplicates-in-powerbi-before-creating-new-rows-in-a-dataset/56654>\
**Category:** Questions\
**Created:** [October 1, 2024, 3:49pm UTC](https://community.make.com/t/removing-duplicates-in-powerbi-before-creating-new-rows-in-a-dataset/56654 "2024-10-01T15:49:08Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![FPM\_Support](https://avatars.discourse-cdn.com/v4/letter/f/7ba0ec/32.png) [@FPM\_Support](https://community.make.com/u/FPM_Support)\
**Post date:** [October 1, 2024, 3:49pm UTC](https://community.make.com/t/removing-duplicates-in-powerbi-before-creating-new-rows-in-a-dataset/56654/1 "2024-10-01T15:49:08Z")

</div>

### What are you trying to achieve?

Import data to a PowerBI Dashboard, but delete older entries in the model bases on one value.

Once a day I want to import data from an erp system into powerbi.  
One of the values i use as an identifier is the “erpId”.

Every erpId should exist only once in my PowerBI model.  
Is there a way throught [make.com](http://make.com) to guarantee this?

### Steps taken so far

Haven’t tried anything perticular by now. I’m wondering if this is possible at all as i don’t see a finished model that would do the job.

### Screenshots: scenario setup, module configuration, errors

 ![Screenshot 2024-10-01 174503.png](https://europe1.discourse-cdn.com/flex013/uploads/make/original/3X/f/5/f52483ab4affdeced9de3b6cdb20ff887cc5566f.png)

---

<div class="post-metadata">

**Author:** ![LinkYourTech](https://avatars.discourse-cdn.com/v4/letter/l/ba8739/32.png) [@LinkYourTech](https://community.make.com/u/LinkYourTech)\
**Post date:** [October 2, 2024, 2:21am UTC](https://community.make.com/t/removing-duplicates-in-powerbi-before-creating-new-rows-in-a-dataset/56654/2 "2024-10-02T02:21:05Z")

</div>

So essentially you want to replace an old value with a new value correct?

If so all you need to do is use a search module to find the id and delete it before adding the new values.

Hope this helps!

---

<div class="post-metadata">

**Author:** ![ImMichaelCannon](https://dub1.discourse-cdn.com/flex013/user_avatar/community.make.com/immichaelcannon/32/48674_2.png) [@ImMichaelCannon](https://community.make.com/u/ImMichaelCannon)\
**Post date:** [October 2, 2024, 2:23am UTC](https://community.make.com/t/removing-duplicates-in-powerbi-before-creating-new-rows-in-a-dataset/56654/3 "2024-10-02T02:23:05Z")

</div>

Good morning @FPM_Support;

Conceptually, you can query your current `erpID` entries to create a simple array of them.

Then as you iterate through the incoming entries, check whether the entry’s `erpID` is `{{contains}}(erpID-array; erpID)` in router’s first branch filter to remove that entry, and then the router’s second branch adds the updated entry.

Good luck 🍀

---

<div class="post-metadata">

**Author:** ![Make\_Bot](https://dub1.discourse-cdn.com/flex013/user_avatar/community.make.com/make_bot/32/14661_2.png) [@Make\_Bot](https://community.make.com/u/Make_Bot)\
**Post date:** [December 31, 2024, 3:25am UTC](https://community.make.com/t/removing-duplicates-in-powerbi-before-creating-new-rows-in-a-dataset/56654/4 "2024-12-31T03:25:26Z")

</div>

This topic was automatically closed because it's resolved or inactive. Please, start a new topic.


