跳至正文

【译】即席分析技巧,10 Things you didn’t know about Ad-Hoc Calculations in Tableau 9

标签:

(最好用的两个地方:用来显示标题,用来排序。)

    即席分析是Tableau 9的新功能,他们非常好用而且好玩,可以用来完成很多工作,也是我最喜欢的功能之一。

    Ad-hoc calculations are new in Tableau 9.0.  They’re quite useful.  And they are fun!  There’s so much you can do with them.  They are indeed one of my favorite things.

    Here’s a  quick start from Tableau to get up to speed.
    And, once you’re ready, let’s dive deep for some Tableau tips and tricks using ad-hoc calculations in Tableau 9:

    通过拖拽计算编辑器里的计算字段到视图或者功能区,可以轻松创建即席计算。

    反过来亦然。

    而通过即席计算字段拖入维度或度量面板,可以生成固定计算字段,以备后期使用。

    1. Create Ad-Hoc Calcs by dragging text from the Calculation Editor into the view or onto shelves

    Drag and Drop from Calculation Editor

     

    1. Do the reverse: Drag and drop ad-hoc calcs into the calculation editor
    2. Drag and drop the ad hoc calculation from the view to the Dimensions or Measures in the Data pane to actualize them as calculated fields in the data connection.
    3. You knew you could create an ad-hoc by double clicking on Rows, Columns, or in the Marks card. But did you know you can create them on the Measure Values shelf too?
    4. Create titles for views. Just double click a space on Columns type the title inside quotes and do some formatting.  Why would you do this?  Check out this post.创建视图标题。在列双击输入引号和文本,然后修改格式,就可以轻松创建标题。

    Create Titles

     

    1. Drag and drop fields, sets, and parameters into ad hoc calcs. Just start the ad-hoc calc, then drag from the Data pane or from anywhere else in the view:随时随地,通过拖拽字段、集、参数到即席分析中。

    Drag and Drop Into

    1. Double click any field in the view to start an ad hoc calculation. If the field is from the connection, the code starts with a reference to that field.  If it was an ad-hoc calculation then you pick up editing where you left off. 试图中,随时双击一个字段,开始即席分析。
    1. Use them to sort a view, even with blended fields and calculations that don’t always play nice with sorting. Here I copy the field (hold Ctrl while dragging) I want to use for sorting from Columns to Rows, double click it to Edit it as an ad hoc calc, place a negative sign in front to sort the direction I want, change it to discrete and move it to the front so it defines the sort.  You could do similar things with ad hoc calculations using the Rank() function.
    • 用来排序,即便是混合数据和其他对排序不太友好的数据。把列字段区域拖入行字段区域,双击编辑,前面加上负数,拖到想要排序的标题前面,数据从连续改为离散。

      Sort with Ad Hoc Calculations in Tableau

      1. Multi-Line Ad-Hoc Calcs. While typing an ad-hoc calc, press Shift+Enter to start a new line.  Caution: the field will only appear with the first line showing, so this is a great way to confuse your co-workers.  However, it can be used to make things clearer – see #10:
      • Shift+Enter输入新行,可以用于想误导别人的地方,它会也会让展现更加清晰。

         

        1. Named Ad Hoc Calculations. Using the mult-line approach works really well if you make the first line a comment (i.e. start with the double slash: // ).  Why?  Because then the ad-hoc calculation gets a name which will show in Row or Column headers.  Both of the fields on Rows in the view below are ad-hoc calcs with the code
          City + ", " + [State]

          but the second one is mult-line with the code

          //City and State
          City + ", " + [State] 
        • 重命名继续分析标题。

          Named Ad Hoc

           

          And now you know 10 things you never knew before about ad-hoc calculations in Tableau.

          Or maybe you did know these.  And maybe you know other tips and tricks I didn’t mention.  I’d love to hear from you in the comments!

          Post Tagged with , , , ,

          了解 喜乐君 的更多信息

          立即订阅以继续阅读并访问完整档案。

          Continue reading