KNOWLEDGE BASE

How to Adjust the Text Alignment in a Simulated Crosstab Made by Dual Axes of SUM(0) and SUM(0)


Published: 22 Dec 2023
Last Modified Date: 29 Dec 2023

Question

How to change the text alignment on simulated crosstab made of dual axis of SUM(0) and SUM(0).

Environment

  • Tableau Desktop

Answer

Assuming we have a simulated crosstab made like below.
* Please refer to the [Original Sheet] in the Sample(Format).twbx.
User-added image

How to change the text alignment of the sub-category(Orange column) column to be left.

1. Create a calculation field [1]
AVG(1)

2. Replace the original SUM(0) with field [1] and adjust the format of the view.
Please refer to the video Sample(Format).mp4 to check the detailed steps.
After changing the format:
User-added image
*Please refer to worksheet [After] in the Sample(Format).twbx.


 

Additional Information

As a workaround of coloring cell background conditionally, using the dual axes of SUM(0) and SUM(0) to create a simulated crosstab is often used.

However, as the simulated crosstab is not a real text crosstab, the text alignment can not be simply adjusted by [Format] menu. The method introduced above is a workaround when text alignment adjustment is needed.

For regular crosstab with dual axis, please refer to the solution below: 
How to Align Text Displayed in a Dual Axis Measure Column
 
Did this article resolve the issue?