A neat solution I discovered when I first began working with MicroStrategy was how to create a metric with a fixed value. I am a big fan of this solution because the fixed metric value is calculated by the MicroStrategy Analytical Engine after the SQL query is executed against the data warehouse. Compared to other solutions which are table based, this solution will not create any unwanted cross joins in the report SQL query.

assign static value to microstrategy metric

constant metric microstrategy

constant number value metric microstrategy

constant text value metric microstrategy

metric with a single value microstrategy

metric with constant number value microstrategy

metric with constant text value microstrategy

microstrategy applysimple metric

microstrategy metric static value

microstrategy constant metric

microstrategy static metric

microstrategy text metric

static metric microstrategy

In the past, I have used this solution for calculating budgets, inventory shrinkage, forecasting, thresholds, data visualization hacks where a text was required for a metric, and any other requirements where a constant metric value of a text or number was required.

To create a metric with a fixed NUMBER value, copy and paste the pass-through expression code below into your metric definition. To change the metric number value from 7%, update the 0.07 to your desired value.

ApplySimple("#0", 0.07)

MicroStrategy metric with a fixed forecast of 7%


To create a metric with a fixed TEXT value, copy and paste the pass-through expression code below into your metric definition. To change the metric text value from ABCDEFG, update the ABCDEFG to your desired value. Under the Subtotals / Aggregation tab, don’t forget to set the Total subtotal function to Maximum in order to display the text value as a total in your grid(s).

ApplySimple(" 'ABCDEFG' ", 0)

MicroStrategy metric with a fixed string value of ABCDEFG

Sources: KB11508 and KB5221