The Rotating table in QlikView is similar to the column and row transpose feature in Microsoft Excel but with some additional options. We can transpose columns in multiple directions and they give different results. In this chapter, we will be seeing the normal transpose option of converting rows to columns.
Let us consider the following input data, which represents the actual and forecasted sales figures.
Month,Forecast,Actual March,2145,2247 April,2458, May,1245, June,5124,3652 July,7421,7514 August,2584, September,5314,4251 October,7846,6354 November,6532,7451 December,4625,1424 January,8547,7852 February,3265,
The above data is loaded to QlikView memory by using the script editor. Open the script editor from the File menu or press Control+E. Choose the "Table Files" option from the "Data from Files" tab and browse for the file containing the above data.
After clicking Next, we choose the Enable Transformation Step button to carry out the required data transformation.
As we are going to use the Rotate function, let us choose the Rotate tab which displays the values of all the fields.
We click the Transpose button to transpose the above data. The transposed data appears as shown below.
The load script for the Transformed data can be seen using the script editor. The script shows the expression, which replaces the empty cell values.
The transformed data can be seen by creating a Table Box using the option in the menu Layout → New Sheet Object.