Forum

Table.Buffer - Stil...
 
Notifications
Clear all

Table.Buffer - Still not sorting

3 Posts
3 Users
0 Reactions
560 Views
(@imkb)
Posts: 1
New Member
Topic starter
 

I have a PQ which is attempting to sort two columns, one by date, one by time. When loading the query into a table, the order is not in the desired order I set in PQ.

I did a bit of research, and learnt that wrapping sort with Table.Buffer usually resolves this, so I created this.

Table.Buffer

In preview mode, it lists the data in perfect order.

PQ Preview

However, when the data is loaded to a table, the table does not duplicate the above, skipping dates and times.

PQ Table

It's sorting in a manner, but missing many many rows and sorting them further down the table. For instance, 14/04/2022 is on the 20,000th row.

I did some further investigation, and referenced my original query without any additional steps. Loading the referenced query, displays the table perfectly! I'm completely confused as to how the original query is not sorting how I want it, but referencing it does.

Any thoughts?

 
Posted : 20/04/2022 3:11 am
Riny van Eekelen
(@riny)
Posts: 1194
Member Moderator
 

You could try adding an Index column and then sort.

 
Posted : 20/04/2022 8:33 am
Philip Treacy
(@philipt)
Posts: 1629
Member Admin
 

Hi Kirsty,

Try putting Table.Buffer inside Table.Sort e.g.

Table.Sort( Table.Buffer(#"Extracted Day Name1"), .... )

regards

Phil

 
Posted : 20/04/2022 6:50 pm
Share: