Metric selectors in MicroStrategy provide user the flexibility to select which metrics they would like display in their reporting and make change on the fly. It's a great feature! Unfortunately dossiers do not have out of the box/single click setup for metric selectors. Not to worry, we can mimic the behavior of a metric selector.
In an earlier post (here) I outline how to create a generic attribute. We're going to leverage the generic attribute to create a metric selector.
In this dossier I have 3 metrics; Profit, Sales, and Discount.
Using the generic attribute method I add "Discount", "Profit" and "Sales" as elements to the attribute. Then add a filter which uses the generic attribute and target the visualization.
For the generic attribute to work properly I create a metric with a case statement. In the case statement is defined as - When generic attribute = "Sales" then use the "Sales" metric, when generic attribute = "Profit", then use the profit metric - with an else escape to the "Discount" metric. I could have used a case statement for the "Discount" metric too - but then I would have been required to provide an escape anyhow. Since there are no other options, I used the discount as the escape. This also saves on processing in the analytical engine.
Next add this metric and the generic attribute to the grid... and Viola! A Metric selector in a Dossier.
Thanks for checking out this blog post. If you found this post helpful please consider donating. Any contribution is appreciated! Just click the PayPal icon at the bottom of this page.