问题
I'm having trouble understanding the following picture where the measures listed as rows appear as columns:
The picture is from an article which contained the following explanation:
Step 6: Add Latest Week Volume, Prior Week Volume, Change and % Change to the Rows shelf and then convert them all to discrete. This will make them appear as columns of data.
Why is the bolded text true? Why do the rows appear as columns?
回答1:
The following mental substitution works for discrete (blue) fields.
Putting a discrete field called X on the row (column) shelf tells Tableau to create a row (column) for each X. The fields nest within each other according to the left to right order on the row or columns shelf.
So in your example, you are specifying to create a row for each stock, and within each stock row, make a row for value of Latest Week ..., and within each of those rows, make a row for each value of Prior Week ...
Since there is only one value of each of those discrete measures for each stock, you only get one row for each stock. The end result is that you get a column for each of the discrete fields on the rows shelf. Yes that seems strange, but it makes sense in the Tableau world. You can drop fields on the X or Y axes instead of the Row or Column shelves as a shortcut if that makes it more intuitive.
Continuous (green) fields are a little different. They create an axis instead of a group of row or column headers. I think that continuous measures will be displayed along the row or column axis as a pneumonic.
来源:https://stackoverflow.com/questions/30469390/when-are-rows-displayed-as-columns-in-tableau