Hiding columns in a straight table may lead to the columns changing order. For this to happen the column order must first be manually altered, so that dimensions and expressions are mixed like in the example below.
For example if the dimension Dim2 is hidden, then Dim3 takes its place instead of the expression Exp2 which is visually the next column in order.
The same phenomenon happens if the expression Exp1 is hidden. This leads to the expression Exp2 replacing Exp1, instead of the dimension Dim2 which is visually the next column in order.
The straight table dimensions and expressions are handled separately. This means that when a dimension is hidden the next dimension in line will take the spot, and if an expression is hidden the next expression in line will take the sport.
One solution can be to replace the dimensions with expressions, so that there are no dimensions after the first occurrence of an expression in the straight table.
For example as in the tables below, where the dimensions Dim2 and Dim3 are replaced by the expressions ExDim2 and ExDim3 instead of presented as dimension. When the expressions ExDim2 or Exp1 are hidden the column order remains consistent.
Notice, it is not always possible to replace a dimension with an expression.