Are you still unable to achieve the desired result? I have not had much experience with working with Custom SQL and parameters in Tableau. I believe you found the Community Idea for the feature. Please continue to share and vote up the idea as it helps our product development team plan for upcoming releases.
Hope this helps!
Well, I do have huge amounts of experince of using CustomSQL although, my data is quite small - the largest I use CustomSQL with is (currently growing daily by around 10 million rows) 7 billion rows and 120 colums wide; the smallest is 250 million rows so apologies if these tables aren't as big as yours but still, with the correctly defined and tuned query, Tableau could still render quite fast.
First-off Steffi, can I ask why you haven't placed these two fields in the source sql of yhe CustomSQL statement instead of using in Tableau?
Tableau is really the place for semi and non-additive calculations, and logic, whereas, unless the max and min are calculated exclusively from the result-set of a Tableau filter, then max and min are therfore additive and thus best placed in the source.
That said, you could always use window calcs in order to get this number too eg Window_Max(Date) and Window_Min(Date) and then just scope correctly; although, I am a strong-advocate for keeping these calcs in the sql to reduce unnecessary stress on the underlying server