Date de dernière modification : 20 Jul 2023
Environnement
Tableau DesktopRéponse
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
Merci de nous avoir donné votre avis sur l’efficacité de l’article.
Ouvrir un nouveau cas
Continuer la recherche
Base de connaissances
Communauté
Aide produit
Formation et tutoriels