Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello there,
My question is: Is there a way to swap two rows in pivot table? Lets give the following example:
We got table:
Header 1 | Header 2 | Header 3 | Header 4 |
---|---|---|---|
A | 123123 | das132a | 11223 |
B | 523123 | fgg2212 | asad |
G | 123124 | sda5123 | 3311s |
J | 123215 | f123f | 21312 |
Z | 123555 | 5235 | dfd |
Lets say Column 2 -> Header 2 is Expression or Calculated Dimension. Header 3 is expression too or Calc. Dimen. so is Header 4 too.
We got in Header 2:
=IF(above([Header 2])>[Header 2],.......swap ROW1 with ROW2 somehow............,[Header 2])
Thanks.
Not sure what you want to do? You want any kind of sorting-logic? If you want swap or replace some parts from rows its better done within the script - with previous() and/or peek() could you look into the values of other rows.
- Marcus
I want to swap data in Row 1 (header 1 A) with data in Row 2 (header 1 B).
You need to do that kind of transformation in the script side
Load your raw-data in qv then make a resident load over the first load to have the possibility to sort your data (order by statement) and the you could use peek() or previous() to compare and exchange the data from actual row with the from previous row respectively to n-rows.
- Marcus