Dataflows vs Dashboards — What to use and when?
By: Sayantani Mitra
Tags: Dashboards, Einstein Analytics, Tableau Crm, Dataflow

Why are we talking about this?

Dataflows/Recipes/Data Prep 3.0 (Let’s call this whole gamut as Dataflows for this post) and Dashboards are an integral part of our work with Tableau CRM (TCRM). A question and challenge we always come across and ask ourselves or experts is should we approach the solution to the problem statement using Dataflows or Dashboards or do we need a combination of both? Let’s break this apart today and understand what to use and when.

Common Questions asked

Can we perform the calculation in the widget/lens/dashboard (for simplicity, we will call this dashboard) or should this be done in the dataflow? Should we join ALL our datasets that we intend to use in the dashboard/widget to form a comprehensive dataset in the dataflow and then work with it or should we join these datasets in the dashboard? Are we proficient enough to do this in the dataflow, if that is the preferred route for this issue? Are we proficient enough to do this in the dashboard where SAQL and Interactions (fka Bindings) maybe required?

Let’s Crack the Code!

It is not always a matter of which we know better or we think is easier for us to solve. And we will come across scenarios where we try doing something in the dataflow and then realize, it doesn’t work the way we want. A good example is one-to-many join. If you perform a one-to-many join in the dataflow and then try grouping it, you will see that the data is all over the place. That one has really joined to many and some of those should never ever have joined! Example, one weather station that contains weather data but services multiple store locations for a retail chain in a city! But, this works like a charm if your only purpose is to filter!

Another example of such a challenge would be aggregating the data in the dashboard. Of course, you can aggregate the data in Recipes/Data Prep 3.0, but then you will need to join it back to the original dataflow either to not create a separate dataset for this or for multi value row level security. An example for this would be Avg Amount by Account and Year. Now imagine the Account has a few other fields like Type of Product. If we average the amount in Data Prep 3.0, you may need to add it back to one of the dataflows for reasons mentioned above.

Now that we have the why out of the way, let’s see when to use what.

Dataflows

When we need to compare data to previous rows and doing that using windowing function would not help.

When we need to repeat the task, say a formula, to be used in multiple dashboards like currency conversions.

Date fields — It is easier to create date fields strings (Year, Quarter, Month, Like4Like etc.) from date fields in the dataflow for filtering in dashboards.

Aggregate in Data Prep 3.0 and add it back to the dataflow when it might be a cumbersome calculation in dashboard.

Join multiple objects/datasets when that forms part of a logical chain. Say, child to parent to grandparent. Caveat: If the grandparent then has another branch that creates child and grandchild, create a different dataflow.

All the joins will be left joins then use dataflows! Right/Outer/Inner joins don’t work in dataflows yet. But they are part of Data Prep 3.0 and can be used there.

Dashboards

Simple aggregation of datasets.

Easy calculations and even a few complex ones where the data should update based on row level and upper level filtering.

Joining multiple datasets in a widget when it will maybe used in 2–3 dashboards and creating a dataflow for that would take more time than creating a dataflow.

With all joins available in dashboards, it is easier to join datasets there now. But we can join only 4 datasets from the UI. And the more datasets we join in the UI, the more heavy the dashboard becomes.

SOQL: Any dashboard that needs real-time (Live) data should use SOQL and it is available only at the dashboard level.

Dataflows and Dashboards

There will be cases where we will have to rely both on our dataflow and dashboard skills to meet our requirement. An example for this would be a field, say days/months between two dates which can be done in Salesforce but, can as easily be done in dataflow! This can then be used to filter dashboards where we are looking for a specific period of time like orders where the number of days been order and shipping is more than 7 days.

A combination of dataflow and dashboard when used the right way can shorten the time we spent on creating dashboards and make our lives easier!

Parting Thoughts!

The above is in no way a comprehensive list of all that can be done and cannot be done in a dataflow or dashboard. Every company has a different use case and as TCRM grows and more people work on it, the more the use cases. This is meant to give us a feel of what to do and what not to do. Ultimately, we will have to find what works best in our case and find the right solution!