Forum Discussion

gordgord1's avatar
gordgord1
Regular Visitor
6 months ago
Solved

Sequencing Numbering within a Group Based off Unique Values

Hello,  Company I am at is decommissioning Alteryx. Need some guidance to perform some sequence numbering in Power Bi/Power Query by group.   1. Filtering out products that already have an end da...
  • gordgord1's avatar
    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.