Instead of selecting a column to sort a table by in a dropdown, how do I add the sorting column names in a separate column?

huangapple go评论76阅读模式
英文:

Instead of selecting a column to sort a table by in a dropdown, how do I add the sorting column names in a separate column?

问题

我有一个工作簿,在其中我显示了一个表格,用户可以从下拉菜单中选择一个列,然后查看基于该列的前3个ID(度量A,度量B,...,度量H):

现在,我想要在表格中添加一个名为“排序标准”的单独列,该列将存储表格的各行所基于的列名进行排序。因此,预期输出如下所示:

我该如何操作?如果需要的话,我可以使用Tableau Prep Builder进行中间步骤,以应对Tableau Desktop可能过于复杂的情况。

英文:

I have a workbook where I have displayed a table where the user can view the top 3 IDs based on a column they can select from a dropdown (Measure A, Measure B, ... , Measure H):

Instead of selecting a column to sort a table by in a dropdown, how do I add the sorting column names in a separate column?

Now, instead of this, I want to add a separate column called Sorting Criterion to the table that would store the column names with which the respective rows of the table was sorted. So, the expected output is something like this:

Instead of selecting a column to sort a table by in a dropdown, how do I add the sorting column names in a separate column?

How do I do this? I'm open to using Tableau Prep Builder, if needed, for intermediate steps that may be too convoluted for Tableau Desktop.

答案1

得分: 1

创建一个仅包含“Sort By”参数的计算字段。将此计算字段添加到您的视图中。

英文:

Create a calculated field that just contains the Sort By parameter. Add this calculated field to your view.

Instead of selecting a column to sort a table by in a dropdown, how do I add the sorting column names in a separate column?

huangapple
  • 本文由 发表于 2020年1月3日 15:20:25
  • 转载请务必保留本文链接:https://go.coder-hub.com/59574627.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定