上次修改日期 : 20 Jul 2023
環境
Tableau Desktop答案
The attached example workbook uses the sample data set Superstore to demonstrate the following directions:- Click the down arrow next to Dimensions in the data pane and select Create Parameter…
- In the Create Parameter dialog, do the following and click OK:
- Name the parameter. In this example I will call it "Select Start Date"<.li>
- For Data Type, choose Date
- For Allowable values, select Range
- Check Step size and select 1 Months
- Right-click [Select Start Date] in the data pane and select Show Parameter Control
- Select Analysis > Create Calculated Field
- In the Calculated Field dialog box that opens, do the following, and then click OK:
- Name the calculated field. In this example, the calculated field is named "Date Filter"
- In the formula field, create a calculation similar to the following:
IF DATETRUNC('month', [Order Date]) >= [Select Start Date]
THEN [Order Date]
END
- Drag [Date Filter] to the Filters shelf
- In the Filter Field dialog, select Month / Year and click Next >
- In the Filter dialog, do the following and click OK:
- Navigate to the Condition tab
- Select by formula
- Type in the formula:
NOT ISNULL(MIN([Date Filter]))
- Navigate to the Top tab
- Select By field
- Select Bottom 2 by Date Filter Minimum
- Navigate to the Condition tab
感謝您針對本文的效益提供意見回饋。
開啟新案例
繼續搜尋
知識庫
社群
產品說明
訓練及教學課程