Tableau: Dynamically Display The Last n Months From Today

preview_player
Показать описание

Build a bar chart using Month([Date]) and sum([Sales])

Step 2:
Create a new parameter as an integer. Set the default value to 12

Step 3:
Write a calculation to test if the month is greater than or equal to today’s date minus n months. Pass the parameter into the n value.

Step 4:
Drag the field to the filter shelf, and only keep true values. Test with your parameter value.
Рекомендации по теме