Tag Archives: metric

Converting to String with Patterns

Here there,

Quick tip today: How to convert a value to String in a derived metric, for example, using patterns.

Let’s say that you have a date and you want to convert it to a string and get only the Month name with 3 chars. You just need to:

ToString<Pattern=mmm>([Date Attribute])

Get day with 2 numbers:

ToString<Pattern=dd>([Date Attribute]),

Get year with 4 numbers:

ToString<Pattern=yyyy>([Date Attribute])

Convert the value to 0,000 pattern:

ToString<Pattern=”0,000″>([Value metric])

Etc…

You can play around with these Patterns to convert your attributes/metrics to a string using a specific format.

Hope it helps.

God bless you!

Creating a dynamic constant metric using prompts

Hello there,

Sometimes we need to create a constant to compare some numbers with this constants.

Like:

Profit < CONSTANT

And in this case, this constant can be changed by the user.

To create a dynamic constant you can use this simple example:

  1. Create a numeric prompt and name it as promptTest
  2. Create a derived metric as Constant Metric in your report like:Max(?[promptTest]) {~+}
  3. Create the case metric like this: case(profit < [Constant Metric], 1,0)

Now you have a dynamic constant prompt metric.

I hope it helps.

God bless you

Advanced metrics workshop

Hello there!

I’m going to talk about advanced metrics next Wednesday (25/04/2015) in a live virtual classroom. The class is going to be in Portuguese.

If you want to join this group just fill this form below. The price is R$40,00/hour.

The class can be recorded in MP4 and you can watch it live using PC/Mac/Mobile devices.

God bless you!

Erasing custom formats

Hello there!

Today I’m going to talk about how to remove custom formats that you created to format the values.

When you add a new custom format in MicroStrategy it says there until you remove in regedit.

pic

To remove those custom formats, you just have to:

1. Go to regedit (Start -> Execute -> write regedit and hit enter)

2. Go to:  HKEY_CURRENT_USER\Software\MicroStrategy\DSS Agent\Formatting Properties Dialog in the Custom_Formatting_X Key

3. Erase the Custom_formatting_x registries.

pic

Now when you won’t see that custom format¬†in MicroStrategy anymore.

pic2

That’s it.

Hope it helps!

God bless you!