Why you're not able to use Date parameter in SPs. What issue are you facing ?
I meant I can pass a specific parameter that I created in Tableau for a individual SP. Which means, I need to create a separate parameter for each view I have when using the SP as a data source. So, I was wondering if there's a way to use this Input parameter for SP as the global filter for the dashboard (with multiple worksheets and multiple SPs).
I don't understand you. Parameters are always global and they apply to all worksheets in a dashboard and you can also use the same parameter in multiple data sources ?
I'll explain my scenario clearly, hopefully this helps to understand it better.
- I have (hypothetically) 4 Views that will be used in a single Dashboard.
- Each view is sourced by a Stored Procedure, View 1- SP1, View 2- SP2 so on...
- SP1, SP2, SP3, SP4 they all have input parameter for DATE.
- When I bring a new connection, let's say SP1, It asks me to select a DATE. Options I have are: Manually enter a value, Use a Parameter (Tableau) or Create a New Parameter.
- I manually enter a DATE.
- Go to the view and then create a parameter P1 and re-run SP1 and use this P1 here (using the existing parameter option).
- When I add a new connection SP2, it asks for the DATE, I get the same options here too. I can't see the existing Parameter P1.
My question now is, how to use this input parameter(DATE) for SP1, SP2, SP3... as a Global Filter on the Dashboard and let user select a DATE for once and it flows into all the views with underlined data sources as stored procedures.
Am I missing anything? Any approach that you could suggest me? I'm new to using SPs for building visuals in Tableau.
Appreciate your help!!
You're not able to see the the existing parameter in second Sp due to different data type.
Suppose data type of 1st parameter you created is Integer and sp also accepts the integer as a parameter then in drop down you'll see the newly created parameter.
If your second Sp requires string as parameter then you'll not see the parameter you created as integer data type in drop down list.
Hope this helps.
It's the same Data Type Ombir. Just the 'date' I have to give as a input for all SPs.
Which server and connection are you using to connect? Is your all Sps in common database or in different server and database?
It's SQL Server. All are from the same Database.
I'm afraid you're doing something wrong. I replicated same scenario on my PC and its working fine.
Can you record a video and share the steps you're following ?
Thanks Ombir! and apologies for the delay in acknowledging and getting back to you.
I figured what I was doing wrong.There were too many sheets and like you said the Data Type for the Input Variable in Stored Procedures caused this issue. Had to change them all to be consistent to use the Tableau parameter on all sheets.
Thank you again!