Hi - I am working with the Map visualization on a dashboard and would like to enable my users to select which field they would like the color ramp on the map to represent.
The explore I am working off of has several fields of interest and I would like the user to be able to choose from some sort of control (dropdown?) which of those to see at a given time. I would like to set a default and then present them several options.
Is this possible with LookML? I was looking through the Map docs but could not find any reference to which field is used as the value behind the color scale. https://cloud.google.com/looker/docs/reference/param-lookml-dashboard-map
@looker_ant - I saw your answer here: https://www.googlecloudcommunity.com/gc/Modeling/Dynamic-Parameter-for-Dashboard-Tile/m-p/759534 and thought maybe I could do something kind of similar?
Thanks!
Hey there!
With the map visualization, the Pivoted dimension controls the legend color coding, so if you follow the article you linked and create a dynamic dimension for the pivoted dimension that should do the trick.
See my screenshot here - I am pivoting on city so the legend is showing my different colors for San Francisco and Los Angeles. If I was to make that pivoted dimension dynamic based off a parameter - a dashboard user could change which filed is color coding the map.
I don't have time now to build out the full example with code - but I can later if this isn't clear. Just let me know! Wanted to get you an answer as quick as I could.
Best,
Anthony