Forum Discussion

sixelapowerbi's avatar
sixelapowerbi
Regular Visitor
3 years ago
Solved

Set the current phase in a process

Hello everyone,   I need help creating a new column in Power Query that would define the "Current Phase" of each asset in my process. Here is an example.   ID PhaseNumber Start End Active...
  • serpiva64's avatar
    3 years ago

    Hi,

    to obtain this

    - add a Today column

    Date.From( DateTimeZone.FixedUtcNow())

    - determine ActivePhase with a conditional column

     

    - filtered rows

    - grouped filtered table

    - from a previous step i get unfiltered table

    - merge unfiltered with grouped

    = Table.NestedJoin(Custom1, {"ID"}, MinStart, {"ID"}, "Custom1", JoinKind.LeftOuter)

    (you can merge the unfiltered with itself then change the second table)

    - expanded 

    - then add a conditional column for CurrentPhase

    If this post is useful to help you to solve your issue, consider giving the post a thumbs up and accepting it as a solution!