Forum Discussion

matze's avatar
matze
Frequent Visitor
7 years ago
Solved

Summarize on column depending on another

Hello everybody,

 

I have the following problem and it would be great if some of you could help me with it.

I would like to summarize the time depending on the status, so that only distinct status information is visible over time with the information about how long this status was active. (See "How it should be...").

  • Hi matze,

     

    The data has an order implicitly. So we can add an index. Please download the demo from the attachment. 

    1. Add an index in the Query Editor. There are some steps. You can double-click the steps to see details.

    2. Create a column.

    Time Group =
    CALCULATE ( MAX ( Table1[Time] ), ALLEXCEPT ( Table1, Table1[Index] ) )
    

    Summarize-on-column-depending-on-another

     

    Best Regards,
    Dale

1 Reply

  • v-jiascu-msft's avatar
    v-jiascu-msft
    Microsoft Employee

    Hi matze,

     

    The data has an order implicitly. So we can add an index. Please download the demo from the attachment. 

    1. Add an index in the Query Editor. There are some steps. You can double-click the steps to see details.

    2. Create a column.

    Time Group =
    CALCULATE ( MAX ( Table1[Time] ), ALLEXCEPT ( Table1, Table1[Index] ) )
    

    Summarize-on-column-depending-on-another

     

    Best Regards,
    Dale