Dashboard JSON, and the Dataset Analytics Extended Metadata (XMD) JSON, These are two different files.The Dashboard JSON is used to customize the page layout, For this, use the : CTRL + E.
Examples of tasks you can perform on dashboard JSON:
- what type of charts,
- how are they spaced,
- types of queries ran.
The Dataset Extended Metadata (XMD) JSON is used to customize the dataset, For this hover over the desired data set, and an EDIT button will appear. Click it. And download the first file [Add Extended Metadata File (JSON)], edit it and upload it back into the dataset.
Examples of tasks you can perform on Dataset XMD :
- to change API to label name,
- measuring units,
- colours of fields
- Dataset XMD enables you to customize the formatting of dataset fields and their values in Analytics dashboards and lenses.
- If you modify the XMD for a dataset, every UI visualization that uses the dataset shows the modified format.
- You can configure the XMD file to override the default appearance of dataset fields and field values and to add actions to dimensions in charts and tables.
- Each dataset has a separate XMD file.
- After updating XMD in text editor, Save the file in UTF-8 format to ensure that Analytics visualizations display international characters.
- Basic Structure of the XMD JSON File This design makes it easier to debug specific field behavior and maintain consistent syntax usage.
Refer below link for common uses of XMD. Almost all of the XMD functionality is now supported in the UI for Analytics dashboards and lenses.
XMD Validation errors faced when working on it
All error listed on this link with solution: https://help.salesforce.com/articleView?id=000319838&type=1&mode=1
The JSON defines the components of the dashboard and how they interact. Modify a dashboard’s JSON file to perform advanced customization tasks that can’t be accomplished in the designer’s user interface, like:
- set up bindings to override the default faceting behavior
- Set query limits
- Specify columns for a values table
Dashboard JSON properties
The dashboard JSON consists of properties that define layouts, pages, widgets, and steps
Each dashboard JSON contains the following high-level properties:
- label: Name of the dashboard.
- mobileDisabled: Specifies whether the dashboard can be accessed in the mobile app
- State: Specifies properties for all layouts, widgets, and steps defined in the dashboard. When you save a dashboard using the dashboard designer, the state of the dashboard is persisted in the JSON.
- datasets:Specifies all datasets used by steps in the dashboard.
The following sections describe the different properties nested under state.
1.dataSourceLinks: section defines all data sources configured for the dashboard
2.Filters: defines the global filters added to a global filter panel widget, which is available in the dashboard designer.
3.gridLayouts: section defines all layouts built for the dashboard.
4.Steps: The steps key defines all steps available in an Analytics dashboard. It contains a separate node for each step. Each step node has properties that define the query or list of static values. It also contains properties that control the behavior of the step, like whether to facet the step. The properties and JSON syntax vary based on the step type and whether the step is in compact form or SAQL form.
5.widgetStyle: The widgetStyle key contains the default widget properties that can be applied to each widget.You can specify these attributes at two levels. To set the default for all dashboard widgets, use the widgetStyle field under gridLayouts. To set a specific widget, use the widgetStyle field under widgets. Settings at the widget level override the default settings for all widgets.
6.Widgets: section defines the widgets that appear in the dashboard. Each widget has a name.
Thank you, hope this article is helpful. Happy Reading..:)