1 Reply Latest reply on Jan 23, 2019 10:03 AM by Ken Flerlage

    Custom SQL query with parameter in the from clause


      Hi All,


      Im very new to Tableau and we have a requrement where we have prompts for year and quarter, and based on the selection, we'd like to pass those parameters into custom SQL data sources and into the from clause to change the name of the table. Example, Prompt would let you pick 2019 for year, 1 for quarter and then in my from clause that would translate to picking tablename20191.


      If you picked 20183 then the from clause is tablename20183 and so on. When we were using SSRS we were able to do this by making the whole query a string and doing some other crazy manipulation with parameters to get it to work. So was wondering if anyone has done this in Tableau or if its even possible. Thank you all for your time in reading my post.


      Any help is greatly appreciated.