top of page

Create Dossier Metric Selector in MicroStrategy

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.






3,520 views2 comments

Recent Posts

See All

2 Comments


Is there a way to group and filter on multiple metrics. For example, let's say I have 4 metrics ("Cases Sold", "Cases Forecasted", "LBS Sold", and "LBS Forecasted"). In my use-case I want to be able to filter on either "Cases" or "LBS", and when I do I want to display either the 2 Case metrics or the 2 LB metrics. Is their a way to do this?


Thanks in advance!

Joe

Like
Replying to

Actually I just solved this myself, so I thought I'd share this with your readers. In my derived metric I just used a conditional AND in my CASE statement to target the specific metrics.


Here is the table I created to group the metrics:


Here is the formula I created:

Case((([Metric Group]@ID="Cases") And ([Metric Name]@ID="Act Volume Cases")), [Act Volume Cases], (([Metric Group]@ID="Cases") And ([Metric Name]@ID="Forecast (Latest) Volume Cases")), [Forecast (Latest) Volume Cases], (([Metric Group]@ID="Cases") And ([Metric Name]@ID="Rolling LE Volume Cases")), [Rolling LE Volume Cases], (([Metric Group]@ID="LBS") And ([Metric Name]@ID="Act Volume LB")), [Act Volume LB], (([Metric Group]@ID="LBS") And ([Metric Name]@ID="Forecast (Latest) Volume LB")), [Forecast (Latest) Volume LB], (([Metric Group]@ID="LBS") And ([Metric Name]@ID="Rolling LE Volume LB")), [Rolling LE Volume LB], 0)


And…



Like
bottom of page