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.
A dataset may have one or more Lens and Dashboard with different type of information.
- 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.
Before installing this XMD into your local system, make sure that you have installed the JDK.
Use this link to know more about the Installation procedures.
Once you have clicked the Dataset Utils Zip file, it will automatically install Dataset Util in your local system.
- 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.
Here, we need to provide our Wave Analytics Salesforce Login Credential.
Then, we can see what are all the datasets created in our Wave Analytics Salesforce org, by clicking the Dataset List.
- 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
Click on the Edit XMD option.
- 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.
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.
4.Initially, the Product Opportunity has a field label named Opportunity.Stagename.
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.
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.
The Id refers to Opportunity Line Item ID.
Again, click the Group Option on Product Opportunity Dataset. Here, we couldn’t see the Line Item ID because it was hidden using XMD.
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.
- 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.
Like JSON file modification, the same thing will happen in the SAQL (Salesforce Analytics Query Language) modification.
Since we can’t edit the Dataset fields using JSON inside the Wave Analytics, it can be accomplished by using the XMD.
Dataset changes applied to all the Lenses created in future.
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.