Forum Discussion

Learner22's avatar
Learner22
Helper I
3 years ago
Solved

Circular dependency when sorting a column by another column

Dear Community,   I have a calculated column like this   interval 0-5 11-20 6-10 21-30 >30   I want to have the column interval like this   interval 0-5 6-10 11-20 21-30 >30 I use ...
  • Anonymous's avatar
    Anonymous
    3 years ago

    Hi  Learner22 ,

    I created some data:

    Here are the steps you can follow:

    1. In Power query. Add Column – Index Column – From 1.

    2. Create calculated table.

    Table 2 =
    SUMMARIZE('Table','Table'[interval],"Index",MINX(FILTER(ALL('Table'),'Table'[interval]=EARLIER('Table'[interval])),[Index]))

    3. [interval] – Sort by column – [index].

    4. Connect two relations with [interval].

    5. Result:

     

    Best Regards,

    Liu Yang

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly