Forum Discussion
Sequencing Numbering within a Group Based off Unique Values
- 6 months ago
I do not know if the most elegant solution. Yesterday I found an independent solution thru brute force.
1. Filter out Product Event that an End Date (Keep the nulls).
2. Concat Product Name and Program Name plus Start Date (converted date to a number) and Sorted. Earlier Dates would be higher up. (Product plus Date Number below)
3. Grouped by Products. (groups below)
4. Added costom column Rank = Table.AddRankColumn([Groups], "Rank", {"Product plus Date Number"}).
5. Then expanded grouped data.
6. Then filtered where Rank equal 1. In rare case where Product and Event had two rows were on the same day I could show.
I do not know if the most elegant solution. Yesterday I found an independent solution thru brute force.
1. Filter out Product Event that an End Date (Keep the nulls).
2. Concat Product Name and Program Name plus Start Date (converted date to a number) and Sorted. Earlier Dates would be higher up. (Product plus Date Number below)
3. Grouped by Products. (groups below)
4. Added costom column Rank = Table.AddRankColumn([Groups], "Rank", {"Product plus Date Number"}).
5. Then expanded grouped data.
6. Then filtered where Rank equal 1. In rare case where Product and Event had two rows were on the same day I could show.