Sunday, June 14, 2020

Einstein Analytics: Working with Multi-Pages Dashboard

Einstein Analytics offers multi-pages dashboard feature, where we can design the pages similar one to another, or totally different across pages. If the new page similar to an existing page, you can simply clone the page. 

Clone Page
Click the arrow next to the page name (the default page name is "Untitled") and select Clone.

This will create a new page located at the last with page name "Clone of xyz", xyz is the original page name.

But what actually happened at the backend?
Page is defined as pages key under gridLayouts, so when you clone a page:
  1. a new section will be added with label "Clone of xyz" under pages key
  2. the number of widgets in the new page section is exactly the same with the source page
  3. all the keys in the new widgets are exactly the same with the widgets in source page, including name

With this knowledge, you can easily move the page order and label as needed

If we open one of the widgets and looks for the "name" key, as mentioned above, it would be the same, and name here actually is widget ID when you see it in dashboard designer UI.

For our sample of "chart_3", in addition to "name" key in the widget, it also has: 
  • colspan
  • column
  • row
  • rowspan
  • widgetStyle

While the widget details such as color, label, action menu, etc. are defined in the "widgets" section. So "chart_3" from gridLayouts refer to "chart_3" under widgets, then further, "chart_3" in "widgets" refer to a step (which is query) called "Dept_1".

Checkout below screenshot from the dashboard designer for widget ID = "chart_3", if you click Query tab, the ID should be "Dept_1".

From above screenshot, the red arrow tells us that the widget is used on multiple pages, so if we change anything on the widget, it will change for the same on the other page using the same widget, e.g. title, font size, background color, etc. 

Now, let us click unlink and see what will happen, before that let us summarize:
  • chart_3 widget used in Page1A and Page1B page
  • chart_3 widget use step "Dept_1"

Click unlink will change the widget name on that page from chart_3 to something else such as chart_4, however, the query/step remain the same, now if you change the widget background color in one page, it will not change the other one, although the step used still the same. Step refers to the data query from a dataset.

What happened on the backend?
  1. The "name" on page on where we clicked unlink, the widget name under gridLayouts will change to the new name, and no change for other pages.
  2. In the "widgets" section, there will be a new widget added "chart_4", it uses the same step use in "chart_3", which is "Dept_1".

A few more things worth to note:
1. If you remember that we mentioned row, rowspan, column, colspan of the widget in page section; this mean, location and size of linked widgets in a page can be different from other pages.

2. A page can be clone multiple times, from the original or cloned page. Unlink a widget from a page only applicable for that page, the widgets could be still linked in other pages.

3. For a widget has been unlinked to use different query (such as from different dataset), the step needs to be changed manually.

4. You can use faceting (include/exclude) if need to prevent selection in one page not to impact result in other pages.

Benefits using pages compare to using many individual dashboards:
For dashboard builders:
- it is cleaner and easier to maintain only one dashboard, instead of many dashboards in Analytics Studio.
- ability to re-use the same step across pages.

For end-users, working only with one tab, opening a new "page" will not open as new tabs, including when bookmarking the dashboard.

Copy Widget
Einstein Analytics also offers another capability for us to clone widget, select the widget, and click the "Copy Widget" icon. So, what is behind the screen?
  1. Create a new step
  2. Create a new widget, and assigned with step created (1)
  3. Add the widget created (2) to the current page

Compare this to the Clone tab:
  • No new steps created
  • No new widgets created
  • Create a new page under gridLayouts

Page-level ad