View the original community article here
Last Tested: Sep 6, 2019
Problem
By default, dimensions will always appear to the left of measures in tables-legacy. Even if we use a table calculation to reference the dimension, i.e. ${dimension_name}
, the table calc will appear to the left of the measure.
Solution
The Table-next visualization type is the real supported solution here, as it allows columns to be dragged anywhere.
Workaround
Without using table-next, the key is to include a measure in your table calculation so that the calculation is treated as a measure rather than a dimension.
One way to accomplish this is by using an if
function in a table calc. We could do: if(length(${dimension_name}) + ${measure} >= 0, ${dimension_name}, ${dimension_name})
We're using the if statement so that we can include a measure in the calculation. Keep in mind that it also doesn't really matter if the condition in the if
statement is true or false, since it will always return our string dimension.
This content is subject to limited support.