Skip to main content

Hi All, 

 I can't upload full data, so i am created some dummy data with Tableau workibook. 

Find the requirement.

  • The default range for Order Date must include the last 9 quarters.  
  • Only the current quarter can be a partial quarter 
  • The Start Date must always include the 1st day/month from 9 quarters prior 
  • The End Date should match the selected Snap Date 

 

Examples: 

  • Snap Date = 6/30/2026, start date = 4/1/2024 
  • Snap Date = 5/31/2026, start date = 4/1/2024 
  • Snap Date = 4/30/2026, start date = 4/1/2024 
  • Snap Date = 3/31/2026, start date = 1/1/2024 
  • Snap Date = 2/28/2026, start date = 1/1/2024 
  • Snap Date = 1/31/2026, start date = 1/1/2024
  • Start & End date parameters should be based on Order and controlled by Snap date 

I tried some wor around but not working.

Thanks in Advance. 

 

#Tableau Desktop & Web Authoring  #Tableau Public  #Tableau Next  #Tableau Desktop & Web Authoring

4 answers
  1. Jun 2, 2:43 PM

    Hi Pavan! If you don't need multi-select for the Snap Date, @Dan Chissick

    's parameter suggestion would make life much easier. If you only want the user to be able to select existing Snap Dates, the parameter's allowed list of values could be set on workbook load. 

     

    To include nine quarters and only allow partial quarters in the current quarter, I would use the following logic with a Snap Date parameter. (I broke it into three fields for readability, but you could just use one.) 

     

    [Range Start] - always 9 quarters back

    DATE(DATEADD('quarter',-8,DATETRUNC('quarter',[p.Snap Date])))

     

    [Range End] - end of full quarter for snap date, unless snap date is in current quarter

    DATE(IF DATETRUNC('quarter',[p.Snap Date])=DATETRUNC('quarter',TODAY())

    THEN [p.Snap Date]

    ELSE DATEADD('day',-1, DATEADD('quarter',1,DATETRUNC('quarter',[p.Snap Date])))

    END)

     

    [Order Date Filter]

    ([Order Date] >= [Range Start]) and ([Order Date] <= [Range End])

     

    [p.Snap Date] - a date parameter. 

     

0/9000