After some transformations, i get a following table, where each column = week number with some value. Due to week split between months, I get some columns which I need to sum.
In example bellow - Column "48" and "481" should be summed and named "48".
Is it possible to dynamically sum columns based on first two numbers ? (XX = sum of XX & XX1)
CodePudding user response:
Select index column and unpivot other columns
Select attribute column and extract first two chars.
Group and sum.
Pivot back.