HOW TO: Transform Rows

HOW TO: Transform Rows

Using the sourcerownumber parameter allows you makes transformations to rows in a dataset.  You can use this function to promote any row to the header and delete rows or a range of rows.

Example 1:
Promote any row to the header.

1. In the transform editor type in the header transformation.  Then sourcerownumber parameter to choose the row number to promote to the header.  In the example below we will promote row 9 to the header.

Example 2:
You can delete all rows less than or equal to a particular value or a range of values.  In this example, let's delete rows 10 through 20.

1.  Clicking on the row number will offer suggestions of delete and keep.  Choose the delete suggestion card and select to modify the script line.

2. Type the following script into the transform editor to delete rows greater than or equal to row 10 or less than or equal to row 20.

3. Add to script

Please note, that transforming rows can cause transforms such as aggregate, flatten, join, lookup, union, unnest, and unpivot to become invalid or unavailable.  

Depending on your dataset, it is usually good practice to transform rows early in your script.