I have the following table with two columns:
Date | Book Title |
---|---|
01.01.2022 | |
Title1 | |
Title2 | |
03.01.2022 <- unsorted | |
02.01.2022 | |
Title3 | |
02.01.2022 | |
Title4 |
The Date
rows work as a sort of sub-header for the column Book Title
, but as you can see some dates aren't in ascending order. The duplicates aren't an issue.
My goal is to achieve the following (note the unchanged blank cells in Date
):
Date | Book Title (remains unchanged) |
---|---|
01.01.2022 | |
Title1 | |
Title2 | |
02.01.2022 <- fixed sorting | |
02.01.2022 | |
Title3 | |
03.01.2022 <- fixed sorting | |
Title4 |
However, what happens when I sort by ascend normally is that all blank cells are collected at the top of the table. I want to retain the blank cells where and as they are.
I managed to do this directly on Excel by hiding the blanks in Dates
, sorting the remaining cells with the dates, and then unhiding the blank cells. This let me keep the blank cells as they are, and sort the dates only within the cells that are already populated.
How could I achieve this on Power Query instead?