Forum Discussion
Remove duplicates without breaking query folding?
Yeah, exactly.
Hi grggmrtn ,
This can happen if the date ranges are set NOT up to as follows: [Date] >= RangeStart and [Date] < RangeEnd. Is your upper bound set to be equal to or less than or just less than?
Refer to this thread:
Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- grggmrtn5 years agoPost Patron
Hi V-lianl-msft thanks for the reply...
Your answer would make sense if I had actually set ranges, but I haven't gotten to setting the ranges yet, because query folding on my dataset breaks. The final step in my query (remove duplicates) breaks the folding.
So my question is, how can I remove the duplicates without breaking the folding?
- justinh5 years agoAdvocate IV
I could use this as well, did you ever find out how to do this?
Table.Distinct() breaks the fold. How do we tell the servers to return a distinct list after all our previous steps?
- justinh5 years agoAdvocate IV
Never mind. Table.Distinct() only breaks the fold if you use it to remove duplicates from a subset of the tables columns, instead of the whole table. Using Table.Distinct() on the entire table does not break the query folding.