This answer works great for me. I have a follow-on question. I would like to see if there is a way I can offer the user a list of parameters and let them choose the parameters they want to use, then use their parameter list in the query.
Is there something similar to what you did above?
Would the solution involve changing the $(v for variable to $(f for field ?
You can offer them a list of parameters in variable form (check out input boxes for this). The query would then be the same as what I have above minus the LET statement. However, you have to remember that when they change what is in the variable, that won't be reflected automatically on the dashboard. A reload needs to happen in order for this to be reflected. If you are hosting the dashboard on a server, I don't think this will work.