@krishnapriya Arisetti
Hi, it seems you are with the egg and chicken dilema, what is first? If I guess, you use the parameter in the custom sql query, but also, the initial value of the parameter is based on the result of the custom sql query.
So, you may try, to create another data source, with only the distinct dates. Something like
SELECT DISTINCT [DATE] AS [DATE]
FROM [DATA]
Or something like:
SELECT MAX(DATE) AS DATE
FROM [DATA]
And, then create in that new datasource the LOD {MAX([Date]}, to finally use the value when workbook opens with this LOD.
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.
Regards,
Diego Martinez
Tableau Visionary and Forums Ambassador
3 answers