Forum Discussion
Rows aggregation based on various criteria
- Anonymous8 years ago
Alternatively, you can perform the following steps to get target table.
1. Duplicate the Timestamp column in Query Editor, then split the duplicated column by +.
2. Remove Timestamp – Copy1 column and rename Timestamp -Copy2 column to interval.3. Create the following calculated columns in the table.
Column = IF(Table[Interval]=BLANK(),0,Table[Interval])
Index = RANKX(FILTER(Table,Table[Call Identifier]=EARLIER(Table[Call Identifier])),Table[Column],,ASC,Dense)
Difference = var previous=CALCULATE(FIRSTNONBLANK(Table[Status],Table[Status]),FILTER(Table,Table[Call Identifier]=EARLIER(Table[Call Identifier])&& Table[Index]=EARLIER(Table[Index])-1)) return IF(ISBLANK(previous)||previous<>Table[Status],1,0)4. Drag Difference column to Visual Level filters of the table visual and set its value to 1.
Regards,
Lydia
Alternatively, you can perform the following steps to get target table.
1. Duplicate the Timestamp column in Query Editor, then split the duplicated column by +.
2. Remove Timestamp – Copy1 column and rename Timestamp -Copy2 column to interval.
3. Create the following calculated columns in the table.
Column = IF(Table[Interval]=BLANK(),0,Table[Interval])
Index = RANKX(FILTER(Table,Table[Call Identifier]=EARLIER(Table[Call Identifier])),Table[Column],,ASC,Dense)
Difference = var previous=CALCULATE(FIRSTNONBLANK(Table[Status],Table[Status]),FILTER(Table,Table[Call Identifier]=EARLIER(Table[Call Identifier])&& Table[Index]=EARLIER(Table[Index])-1)) return IF(ISBLANK(previous)||previous<>Table[Status],1,0)
4. Drag Difference column to Visual Level filters of the table visual and set its value to 1.
Regards,
Lydia