Forum Discussion

BInovice's avatar
BInovice
Frequent Visitor
4 years ago
Solved

Calculation between rows with same ID

All, my data are structured as below and I need to run the calculated values in the last column. Each ID contains exact same 4 attributes. 

IDAttributeValueCal=(A+C+D)/B
ID1A6 
ID1B2 
ID1C3 
ID1D15
ID2A100 
ID2B40 
ID2C56 
ID2D896.125

 

Alternatively a way to unpivot the table to the following would do, but I could not quite figure it out.

IDABCDCal=(A+C+D)/B
ID162315
ID21004056896.125

 

Any helps are greatly appreciated.

  • You can easily unpivot in the query editor. Select the Attribute column and under the Transform tab, choose Pivot column.

    Then Add Column > Custom Column

     

2 Replies

  • You can easily unpivot in the query editor. Select the Attribute column and under the Transform tab, choose Pivot column.

    Then Add Column > Custom Column