Skip to main content

Hello Everyone,

I need your help with a requirement.

My requirement is to have a button-style Month Selection on the dashboard where users can select a month and view the corresponding data. However, when the workbook is opened, it should automatically select the previous month of the current month by default.

For example:

  • In August 2026, the default selected month should be July 2026.
  • In September 2026, it should automatically select August 2026.
  • When moving to the next quarter, such as October 2026, it should automatically select September 2026.

The month selection should always display only the current quarter months and previous quarter months.

To meet this requirement, I have created this sheet and a Time Shift Parameter, where:

  • M1, M2, M3 represent the current quarter months.
  • M-1, M-2, M-3 represent the previous quarter months.

Could you please review this approach and suggest how I can make the month selection automatically default to the previous month while still limiting the available selections to the current and previous quarter months?

 

 

How to Auto-Select Previous Month by Default in a Month Selection Dashboard?

 

 

 

#Tableau Desktop & Web Authoring

10 respostas
  1. 18 de ago., 13:49

    Jumping back in on the 'highlight' part, Justin - the good news is the dynamic-default approach actually handles all three of your requirements together (show the previous month, highlight it, still fully selectable), and it keeps the month buttons you already built. 

     

    The highlight comes almost for free: if your month buttons are colored by whether the button's value equals the current parameter value - the usual way these button UIs show the 'active' one - then because 'Value when workbook opens' sets the parameter to the previous month on open, that previous-month button is automatically highlighted the moment the dashboard opens. Click any other month and the parameter changes, so the highlight moves with it. That's exactly the 'auto-highlight the previous month, but still selectable' behavior you described. 

     

    If your buttons aren't colored that way yet, add a calc like: 

    IF [Your Month Value] = [Time Shift Parameter] THEN 'Selected' ELSE 'Unselected' END 

    Drop it on Color on the buttons sheet and give 'Selected' your highlight color. Now whatever the parameter equals - the previous month on open, or whatever the user clicks - lights up. 

     

    So you don't have to choose between the two approaches: Don's relative-date method is great for a rolling window as a filter, but for your specific 'buttons, highlight the active one, default to last month' setup, the dynamic parameter default plus a match-the-parameter color calc gives you all of it while keeping the buttons you have. Hope that gets you there!

0/9000