Einstein Analytics Conditional Formatting

Einstein Analytics Conditional Formatting

This is one of my favorite topic from this Summer 18 Einstein Analytics release. Over the years we have been doing lots of heavy lifting on dataflow and recipes or SAQL in order to categorize the reports in a specific segment group or highlighting the outliers and so forth.

In this new Summer 18 release ‘Conditional Formatting’ has become simpler on the platform. Imagine if you have dashboards you want to engage your audience with some kind of color significance highlights. This is now just a few clicks away without writing any single line of code. Also on the UI side it has become more user intuitive. Let’s take few examples –    

Automatic Chart Highlighting: Now if you have any chart you can apply conditional formatting straight on the chart itself. By selecting the chart type and check the widget formatting setting at the very right panel

Chart Segmentation: Based upon the criteria we can simply segment the values and set the right color for the highlighting for that widget.

Chart Bucketing/ Bins: All conditional segmentation can later be associated with specific buckets based upon the business.  In the below sample example based upon the opportunity size I have named it as stage 1 opportunities till final stage.

Calculative Measure Highlighting: Now it’s very easy to set the unique color to the measures. If you have several measures consolidated on the chart. Now you can simply set the defined colors for them

Dimension Conditional Highlighting: Based upon the same principle we can also highlight the Dimension attributes with some uniqueness. In the example below I have used my ‘Amount’ thresholds to highlight the ‘Stages’ in the table column. Therefore identifying the actions based upon color significance is just few clicks away now.

In the example below I am setting my Stage color attributes (Such as TEXT Color or Background color) based upon the ‘Amount’

So if you want to show your column data in a combination of image and do the highlighting. Then you can also do that.

SAQL Conditional Highlighting.  You can always combine the conditional highlighting attribute along with your SAQL statement in case if you want to bring more icons. In the sample below I am trying to bring the arrows in my results generate statement. There are plenty ways to achieve the objective. Let’s take a small example below :

result = foreach result generate  'Revenue_Projection' as 'Revenue_Change', (case 
when 'Revenue_Projection' > 0 then \"\" when  'Revenue_Projection' < 0 then \"\"  else \" \" end) 
as 'Revenue_Icons'; result= limit result 100;"

Then simply passing the value of my SAQL step in a form of results binding on a TEXT widget.

"text_1": {
 "parameters": {
 "fontSize": 24,
 "text": "{{coalesce(cell(Revenue_Outcome.result, 0, \"Revenue_Icons\"),\" \" ).asString()}}",
 "textAlignment": "center",
  "textColor": "#32CD32"
}, "type": "text"

 

 

 

Cheers!
Varun

2 thoughts on “Einstein Analytics Conditional Formatting

  1. Hi Varun, Great write up! Can we easily copy and paste the conditional formatting in the dashboard via (Json or xdm file) and apply it to another dashboard?

  2. Hi Varun, do you know if it is possible to add conditional formatting to a chart without pulling in the field that the formatting is done on? For example, I want to show a bar chart for top accounts descending, and I want to format those bars different colors based on a criteria (which I want to hide from the axis for design purposes).

Leave a Comment

Your email address will not be published.