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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
mike9999
Advocate I
Advocate I

Table.Distinct incorrect

Hi-

 

I'm running a dataflow on a PPU P1 capacity.

 

I have ~12 million rows.

 

I'm attempting a Table.Distinct on six columns of various types. I get incorrect distinct results (it removes at least a row that isn't a duplicate).

 

Table.Distinct(#"Filtered rows", {"Col1-Text", "Col2-Text", "Col3-Text", "Col4-Number", "Col5-Text", "Col6-DateTime"})

 

Per other threads I tried but this produces an out-of-memory error-

Table.Distinct(Table.Buffer(#"Filtered rows"), {"Col1-Text", "Col2-Text", "Col3-Text", "Col4-Number", "Col5-Text", "Col6-DateTime"})

 

Any suggestions? I see the recommendation that buffer is used for more consistent results but i don't think that is an option in my case.

2 ACCEPTED SOLUTIONS
Omid_Motamedise
Super User
Super User

the syntax is correct, try to group the rows based on that 6 columns and see the groups of rows that remoed wrongly this might help to descover the reason of reamoving this rows.


If my answer helped solve your issue, please consider marking it as the accepted solution.

View solution in original post

pbiuseruk
Resolver IV
Resolver IV

The reason you received that suggestion about the Table.Buffer is because sometimes when query folding occurs (when the query is being run at source rather than in the Power BI engine), then it can rearrange steps in order to be more efficient. Sometimes this leads to incorrect results.

Another way to stop this is to use Table.StopFolding instead of the Table.Buffer but I think you may end up getting the same message as they do near enough the same thing.

Let me know if it happens to work for you though

View solution in original post

3 REPLIES 3
pbiuseruk
Resolver IV
Resolver IV

The reason you received that suggestion about the Table.Buffer is because sometimes when query folding occurs (when the query is being run at source rather than in the Power BI engine), then it can rearrange steps in order to be more efficient. Sometimes this leads to incorrect results.

Another way to stop this is to use Table.StopFolding instead of the Table.Buffer but I think you may end up getting the same message as they do near enough the same thing.

Let me know if it happens to work for you though

Also, as another suggestion, could you try to concatenate those columns into one column and then do a distinct count, directly on that one column?

Omid_Motamedise
Super User
Super User

the syntax is correct, try to group the rows based on that 6 columns and see the groups of rows that remoed wrongly this might help to descover the reason of reamoving this rows.


If my answer helped solve your issue, please consider marking it as the accepted solution.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors