Colors, labels, values – oh my!

5
(1)

You might have heard of ‘XMD’ working with Einstein Analytics. But do you know what it is? First of all, XMD stands for ‘Extended Metadata’ and it a set of instructions that defines how a user visually see your dataset. Meaning once you apply these instructions every lens or dashboard leveraging this dataset will see the dataset according to your instructions. The XMD can control colors, labels, and values of your dimensions and measures, which is defined in a JSON file. Previously, making these changes has happened by either writing the JSON yourself or using an unmanaged app like ‘WaveLabs’. Now I won’t link to this app because as of Summer 18 it is no longer necessary. I and do think that deserves a big ‘WHOO HOO’! So with that news, I thought it was time to explain what you can do and where you find it.

The Basics

Since the XMD is related to your dataset, it only makes sense that the changes to the XMD are happening when you are looking at your dataset. Most of the modifications are done in the exploration mode under fields.

So find your dataset and click on it. From the explore mode notice the “Fields” link on the left-hand side, this is where most of the magic happens.

Change labels

Make sure you have clicked the ‘Fields” button, so you see all the fields you once upon a time added to your dataset.

So what are we doing when we change the label? Well, it’s basically the name the user sees of a field. We still have the API name, which will be referenced in the JSON and SAQL, but most users don’t want to see ‘AccountId.Name’ when looking at their dashboards, it makes more sense to see ‘Account Name’. If you want to change every single label you can just start from the top and move your way down, but if you just want to change a few fields then I field the search box very handy.

There are two ways to change the label either hover over your field of choice and click on the arrow to the right of the field and select ‘Rename’ or simply click on the label to change it.

Make sure you save your changes, which will give you a warning that all dashboards that are using this dataset will be affected.

Change values and colors

Each field contains different values, sometimes we want to change those values maybe our users are not used to refer to customers as that, they are keen to see ‘Client’ instead. Well, we can simply change that. And to add to it we can change the color of that value, meaning if we have a donut chart the wedge that represents ‘Client’ will have the chosen color.

Okay, find ‘Account Type’ or ‘AccountId.Type’, hover over the field and click on the arrow that appears where you choose ‘Edit Values’.

You now get a dialog box where you first have to choose which values to modify, so make sure you click each of the values you want to be changed and click ‘Done’.

Now you see the selected values with a white square and arrow next to it – click it.

You can now modify the label as well as the color. If you are changing several labels and/or colors then make sure to click the first arrow ^ again and not the ‘Done’ button. I’ve done that myself many times and it basically means you are done editing the values for those fields, so wait until you are actually done.

Again make sure to save your changes.

Customize measures

Sometimes it’s nice to indicate what a measure symbolizes; is it in dollars, is it in euro or is it not even a currency but how hot or cold the weather is and should thereby indicate it’s degrees. This is where custom format for measures comes in.

Again from within our ‘Fields’ section find your measure, hover over it and choose ‘Number Format’.

As you can see there are quite a few different ones to pick from. If one works pick it else you always have the option to choose ‘Custom Format’. In this scenario, I will choose custom format as I want to have the euro sign in front of my amount.

The easiest way to do this is by selecting one of the predefined formats that fit best and modify it to your liking. So I will pick ‘$#,###’ by click on it.

Once that has been selected I will switch ‘$’ to ‘€’.

The multiplier can be used if you, for instance, have a percentage ‘0.1’ that you want to show as 10%. Just change the multiplier to 100 and change the custom format to ‘#%’.

Hit ‘Done’ and make sure to save your changes.

 

Default Fields in Values Table

When you want to show a values table in your dashboard it will by default select the first five measures and first five dimensions. Now you can easily change the values table to show any fields from your dataset. However, there is a way to set which fields are shown by default. Again under your dataset ‘Fields’ you have an arrow next to the dataset name.

Select ‘Default Fields’ to open up the dialog box where you can define what fields you want to see in a values table.

In the ‘Available Fields’ section choose the fields you want to be selected by default and click on the arrow on the right to transfer them to the ‘Default Fields’ section.

Once done you can hit ‘Update’.

Add derived measures and dimensions

When you are creating calculations on the fly in compare tables or SAQL as well as creating new dimensions that are what we call a ‘derived measure’ or a ‘derived dimension’. We can add these derived fields in our dataset so we can customize them just like we have done with our normal measures and dimensions. All you have to do is in the derived section click on ‘+ Add Derived Measure’ or ‘+ Add Derived Dimension’.

A tip if you want to change ‘Count of Rows’ to say ‘Count of Opportunity’ is to create a new derived measure called ‘*’.

Once it’s created go ahead and click on it to rename it and call it ‘Opportunity’ and save your changes. If you now show ‘Count of Rows’ you will see it has been changed to “Count of Opportunity’.

Enable Actions

The final thing we can enable in the dataset XMD is actions. This is unlike all the other features not enabled under the ‘Fields’ section but under the dataset ‘Edit’ section. So find your dataset and to the right of the name click the arrow and choose ‘Edit’.

On the bottom of the page, you will find the ‘Configure Actions’ button, which you need to click.

You can enable actions to every single field in your dataset if you wish to. Let’s look at an example where we want to open up Opportunities when we click on the ‘Account Name’. First of all find and select the ‘Account Name’ field.

The ‘Record ID Field’ is the field in the dataset that represents the Salesforce ID that we want to open up. In this case, it will be ‘Opportunity ID’.

Since my dataset represents opportunities each row is an opportunity. Since an account can have several opportunities it may actually be the case that there is more than one opportunity that is related to the ‘Account Name’. In this case, Einstein Analytics doesn’t know which opportunity to open and instead, a dialog box will be shown to the user that needs to make a choice. Without any details of the related opportunities, it can be hard to make that choice so we can choose which fields to display in the dialog box in the ‘Display Fields’ section. Here I just want to show ‘Opportunity Name’, ‘Opportunity Owner’ and ‘Close Date’, so I have selected those three fields.

Finally, I need to define which actions should be available. You can allow the user to open the Salesforce record and to perform Salesforce actions.

Note that you can either allow the user to use all global actions from Salesforce or you can choose the specific actions you will allow the user to perform.

Again remember to save your changes.

How useful was this post?

Click on a star to rate useful the post is!

Written by


15 thoughts on “Colors, labels, values – oh my!”

  • 1
    Tanushree Roy on October 22, 2018 Reply

    You are always Awesome like your post Rikke Hovgaard.

    its very useful. I was searching for wave labs but now when I didnt find this, I just seen your post. its really appreciable. Thanks a lot for post. its very useful.

  • 2
    Arnab Bhattacharya on April 18, 2019 Reply

    Hi,

    Thanks for explaining the custom action. I tried creating one for my dataset, but in the dashboard I am not able to see my custom action. Am wondering how to show that to you? What might have gone wrong?

    • 3
      Rikke on April 29, 2019 Reply

      Did you make it global?

  • 4
    Alex on May 3, 2019 Reply

    Hi. Good blog.
    How Can I find the XMD version? I face validation error on TEST env but the same dashboard is not failing on DEV env.

  • 5
    Neil on January 9, 2020 Reply

    Hey Rikke,

    Amazing Blog! You always publish amazing and very useful articles. You have been a great resource for me.

    Do you know if it’s possible to use the custom format to prefix a measure with a positive(+) or negative(-) symbol conditional on the returned value?

  • 7
    William Brown on February 13, 2020 Reply

    Hi Rikke,
    When you apply conditional formatting in the UI on a widget, where does that metadata get stored? I was trying to copy a lengthy amount of customization from one dashboard to another but do not see specific metadata in the dashboard JSON. Cloning the dashboard retains the formatting, but if you copy the dashboard JSON from a dashboard into a blank dashboard, the conditional formatting is gone. Where is that metadata stored because it’s not in the dataset XMD?

    • 8
      Rikke on February 14, 2020 Reply

      Conditional formatting is stored in a Asset XMD that can only accessed via api

      • 9
        William Brown on February 14, 2020 Reply

        Thank you. BTW, I love your blogs… really informative and helpful 🙂

        • 10
          Rikke on February 14, 2020 Reply

          Thanks ?

  • 11
    Arthur Kennedy on May 21, 2020 Reply

    Thanks for producing this blog Rikke! It’s extremely useful.
    Is it possible to edit the format of labels in a chart (not field labels)? Sometimes they won’t display at all despite clicking ‘Preserve Labels’ under Auto Fit in the Chart settings and increasing the widget size. Also is it possible to edit the number format of a label, from say, ‘1.5k’ to display ‘1,500’?

  • 12
    ekta on January 8, 2021 Reply

    Can we dynamicaly change currency symbol from local to reporting currency without changing the xmd?

    • 13
      Rikke on January 8, 2021 Reply

      Have a look at my binding series – also have one with multi currency.

      • 14
        ekta parwani on January 8, 2021 Reply

        Yes but that requires us to manually enter the different currencies..I want to directly take it from a field.

  • 15
    Harini on June 22, 2023 Reply

    Hi Rikke !
    I renamed my measure column name in dashboard from “Sum of Quantity” to “Quantity”. I can able to see this in dashboard XMD. Where can I see this in TemplateBundle. There I can see only the custom format but not renamed field.

Leave a Reply to Rikke Cancel reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.