OMS View Designer – Use Name & Value Separator

If you are designing views on the OMS dashboard you rely on collected events. There are times when you want to parse values and only use parts of the field values. But how can this be done if data is already collected? Read on!

 

I will use my Tesla Supercharger view as an example. I blogged about it some months ago, but you can use any other collected data as well to go through the process. This is one of the collected events:

image

Pay special attention to the property “Name_s”. This is the City and State of a Supercharger. Both values are separated with a comma. Based on those events I created some custom views:

image

This is the exact query I used for this example:

Type=TeslaSuperchargerData_CL (Status_s=CONSTRUCTION or Status_s=PERMIT) | measure max(StallCount_d) by Name_s

And the columns are configured like this:

image

OK, it seems the query pulls back all TeslaSuperchargerData for Superchargers with a specific status. Each Supercharger is listed with its name, but the columns is named “Location” to make it easier to understand. As mentioned, the name/location is in format “City, State”. As the data was collected that way one could think that this is exactly what we need to display and that it cannot be changed.

But hey, this is where the “Name & Value Separator” comes into play. It allows us to configure a delimiter to parse and separate the value into multiple chunks. Let’s try.

  • First I define the delimiter as “,” and hit “Apply”. The values in the list are ultimately parsed and everything after the comma is gone.

image

image

  • Next, to bring back the gone values after the delimiter, I need to reconfigure the columns names. As the values are split now, I will name the columns “City” and “State”. Again, after hitting “Apply”, the column names are added and the missing column is back with the appropriate values.

image

image

With that simple trick you can parse values in a list and separate them into multiple columns as needed. Simple but effective. Have fun!

Cheers
Marcel

About Marcel Zehner

Microsoft Azure MVP
This entry was posted in Azure and tagged , , , , , , , , , , . Bookmark the permalink.

2 Responses to OMS View Designer – Use Name & Value Separator

  1. Nithya says:

    Hey can you help on line charts and list

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s