Skip to main content

Hi

I am using custom SQL as datasource so adding parameter into custom sql below to change dynamically.

 

Hi  I have to link parameter in custom sql to filter relevant data. worksheet level filter data showing sum of all values  Total and Grand Total it is not showing  releveant values which is selected from parameter below in details.or

imageor

where Rundate between dateadd(day, - <Parameters.Management Cut off day>,Rundate) and <Parameters.rundate parameter>

 

I tried above scenario but didnt worked.

 

i am using Default Cutoff calculation is

image management cutoff day

imageManagement cutoff days list user selection.imageRundate if user select run date parameter and based on cut off day a like selected as 10 from management cut off day parameter. data should filter 01/20/2025 to 1/29/2025

image 

Filter calculation

imageAttached Workbook please advise.

3 réponses
  1. 26 mai 2025, 16:28

    @Guruprasad P (Member)​ 

    Hi, you have the typical egg chicken problem. Because your parameter initial value depends on the query, but also your query depends on the parameter. So, you need to break the cycle. How you can do it: You may create another datasource that does need Tableau paramters, where you get the initial parameter of the value, and then once the initial parameter of the value is assigned, then the Custom SQL can run.

     

    If this post resolves the question, would you be so kind to "Select as Best"?. This will help other users find the same answer/resolution and help community keep track of answered questions. Thank you.

     

    If this post does not resolve your question, I suggest you to create a new question so other members in the community can take a look of it.

     

    Regards,

     

    Diego Martinez

    Tableau Visionary and Forums Ambassador

0/9000