How to display data for selected past fiscal years along with the most recent fiscal year
Date de publication : 31 Mar 2022 Date de dernière modification : 04 Apr 2022
Question
How to display data for selected past fiscal years along with the most recent fiscal year.
Environnement
Tableau Desktop
Réponse
-Setting the Fiscal Year- 1. Connect to Sample -Superstore 2. Create a new Calculated field like the following. Name : FY Calculation : DATE(DATEADD('year', -1, [Order Date])) 3. Right-click on [FY] > Default Property > Fiscal Year Start > Setting month you want //This time set in April. 4. Drag [FY] to Columns. 5. Drag [Sales] to Text.
-Create Parameter- 6. Right-click on [FY] > Create > Custom Date > setting as following. 6. Right-click on FY (Years) > Create > Parameter > setting as following. 7. Right-click on [Past Fiscal Year] > Show Parameter
-Sales calculation for the Past Fiscal Year- 8. Create a new Calculated Field like the following. Name : Sales - Past FY Calculation : lookup(SUM([Sales]),[Past Fiscal Year]-2021) 9. Drag [Sales - Past FY] to Cross tab -Displaying only the latest year in the view- 10. Create a new Calculated Field like the following. Name : Latest Year Filter Calculation : lookup(attr([FY (Years)]),0)=2021 11. Drag [Latest Year Filter] to Filter Pane > Check 'True'.
Note: Current fiscal year is set to 2021 in the above example.
Merci de nous avoir donné votre avis sur l’efficacité de l’article.