Overview
We can modify the Lens and Dashboards in Wave Analytics by using JSON files; however, instead of doing changes in the JSON file for each Lens and Dashboard, we can easily modify the dataset with the help of XMD, and it will apply all the XMD file changes to the corresponding Lenses and Dashboards. XMD file is in JSON format and is used to customize the formatting of Wave Analytics Dashboard elements. It will work outside of the Wave analytics Salesforce Organization and has a separate login UI, but we can use the same Wave Analytics Salesforce login credential. Refer this link to learn more about XMD.
Note
A dataset may have one or more Lens and Dashboard with different type of information.
Step 1
- To install Dataset utils from GitHub to your local system. Please click here
- Once you click this link, the following page will appear.
- To download the new version of the Dataset Utils, just click on 32 Releases.
Note:
Before installing this XMD into your local system, make sure that you have installed the JDK.
![custom metadata](https://www.mstsolutions.com/wp-content/uploads/2020/12/image-1637.png)
Use this link to know more about the Installation procedures.
Step 2
Once you have clicked the Dataset Utils Zip file, it will automatically install Dataset Util in your local system.
![custom metadata](https://www.mstsolutions.com/wp-content/uploads/2020/12/image-1639.png)
- If you use Mac system, then just right click on the Run [Symbol] Click Open Option.
If you use Windows System, then double click on the Run
- Now, the following Command prompt window will automatically run, and it will open a separate browser tab in your default browser.
![custom metadata](https://www.mstsolutions.com/wp-content/uploads/2020/12/image-1638.png)
Step 3
Here, we need to provide our Wave Analytics Salesforce Login Credential.
![custom metadata](https://www.mstsolutions.com/wp-content/uploads/2020/12/image-1638.png)
Then, we can see what are all the datasets created in our Wave Analytics Salesforce org, by clicking the Dataset List.
![salesforce custom metadata types](https://www.mstsolutions.com/wp-content/uploads/2020/12/image-1639.png)
- Here, I am selecting the Product Opportunity Dataset to customize its metadata.
- Click on the Action Option [Symbol] It will display the following three options:
1. Download Metadata JSON
2. Edit XMD
3. Delete
Step 4
Click on the Edit XMD option.
![salesforce custom metadata types](https://www.mstsolutions.com/wp-content/uploads/2020/12/image-1639.png)
- After the Edit XMD option is clicked, it will redirect to the following JSON file page. The JSON file contains different properties like Values Query Column, Hide Measures, Types, etc.
![salesforce custom metadata types](https://www.mstsolutions.com/wp-content/uploads/2020/12/image-1638.png)
Step 5 – Editing Dataset Field Labels
- Click on the Dimensions. It will list out all the specific dataset labels inside the Product Opportunity.
- If we change the label name, it will automatically be applied to the Lenses and Dashboards.
- For example, Instead of Opportunity.Stagename, change Opportunity.Stagename to Opportunity.Stage. Once the change is done, click on Submit XMD to save the changes.
![salesforce custom metadata types](https://www.mstsolutions.com/wp-content/uploads/2020/12/image-1638.png)
4.Initially, the Product Opportunity has a field label named Opportunity.Stagename.
![salesforce custom metadata types](https://www.mstsolutions.com/wp-content/uploads/2020/12/image-1638.png)
5.Click on the product Opportunity Dataset in Wave Analytics.
6.Click on the Group for filtering opportunity record based the condition. Now, we can see the modified field label that is Opportunity.Stage.
![salesforce custom metadata types](https://www.mstsolutions.com/wp-content/uploads/2020/12/image-1639.png)
Step 6 – Hiding Dimensions
- Expand the hide_dimensions property and enter which field we want to hide while grouping the field.
- The following screen shot shows how to enter the Dataset field name for hiding this field from end user. Once XMD is submitted successfully, it will apply the changes into the corresponding dataset.
Note:
The Id refers to Opportunity Line Item ID.
![salesforce custom metadata types](https://www.mstsolutions.com/wp-content/uploads/2020/12/image-1641.png)
Again, click the Group Option on Product Opportunity Dataset. Here, we couldn’t see the Line Item ID because it was hidden using XMD.
![salesforce custom metadata types](https://www.mstsolutions.com/wp-content/uploads/2020/12/image-1639.png)
Step 7
Instead of displaying amount just in numbers, we can also format property to display the Opportunity amount with a dollar sign using the code snippet as below.
![salesforce custom metadata types](https://www.mstsolutions.com/wp-content/uploads/2020/12/image-1640.png)
Step 8
- We can also edit the Dataset SAQL inside the XMD.
- Click on the Product Opportunity Dataset [Symbol] In the top right corner, you will have Action option [Symbol] click this option [Symbol] Select Edit SAQL.
![salesforce custom metadata types](https://www.mstsolutions.com/wp-content/uploads/2020/12/image-1640.png)
Like JSON file modification, the same thing will happen in the SAQL (Salesforce Analytics Query Language) modification.
![custom metadata](https://www.mstsolutions.com/wp-content/uploads/2020/12/image-1640.png)
Advantages
Since we can’t edit the Dataset fields using JSON inside the Wave Analytics, it can be accomplished by using the XMD.
Disadvantages
Dataset changes applied to all the Lenses created in future.
Summary
Finally, we have done the modification to the specific Dataset (Product Opportunity) with the help of XMD (Extended Meta Data). We have also analyzed as to how to edit the Dataset labels, hide dimensions, format the resulting amount, and editing SAQL inside XMD.