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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
WannesT
Regular Visitor

Triple records after merge and filter

Hi,

I have a strange phenomenon in power query (power bi).

Scenario:

1. get data from SQL server = 3 tables with data, where the tables has exact the same field names

2. append the 3 tables togheter in a new query

3. get data from an excel file in a new query

4. merge the excel data with the query from step 2, with 2 fields linked to each other 

5. expand the columns of the merged fields

 

Perfect! I have the data like I need it.

But then something strange happens. When I filter the resulting query of step 5, then every record is tripled, where the values in the field coming from the query from step 2 are the same or empty.

I have no clue what causes this.

 

Schematic:

WannesT_1-1662731593626.png

 

After filtering on field A, I get this result, so 3 same records with different values in field Y.

 

WannesT_2-1662731630915.png

Any suggestions are welcome.

Wannes

 

1 ACCEPTED SOLUTION
WannesT
Regular Visitor

I have found a solution. Surprisingly it is because there are records in field X with a period in it. For example: Tank4.Inflow. After removing the points, the problem is solved.

I don't know why power query reacts that way on fields with a period in it...

View solution in original post

5 REPLIES 5
WannesT
Regular Visitor

I have found a solution. Surprisingly it is because there are records in field X with a period in it. For example: Tank4.Inflow. After removing the points, the problem is solved.

I don't know why power query reacts that way on fields with a period in it...

Vera_33
Resident Rockstar
Resident Rockstar

Hi @WannesT 

 

When you append 3 tables in step 2, for the same X= Tank1, do you have 3 rows with different Y values? If yes, then it is expected, you merge in step 4, the little table has 3 rows

Txs Vera.

No, all the tanks have only one value. There is one record in the merge for each tank. The values I get in field 'Y' are right, but are double or empty or null. In my example: Tank1 = 500 and Tank2 = 10 are the correct values.

Hi @WannesT 

 

You mean after you append 3 tables, each Tank only has one value in Y, but after you merge it auto generates some empty / null values? It's interesting...can you check both tables before merge, the table has X+Y, all distinct combo, the table has X+A+B+C, all distinct combo?

Yes, al records has distinct combo. And what is weird: only after applying a filter on column A, there are triple records, not before. I cannot understand how those extra records are generated by filtering, unless a bug in power query (dangerous statement, I know).

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.

Top Solution Authors
Top Kudoed Authors