Managing KPI's with Gauge Widgets and Dynamic Bindings

Managing KPI's and scorecards is critical to any business, sales cycles are weekly missions to make your number every month, with the latest release you can really empower your users to know how they are tracking and let managers easily track there whole team.

Now with the Gauge Widget you can easily display how your tracking to a KPI and dynamically bind a target dataset to the mid points.

Lets take a look at the Gauge Widget.

The Gauge Widget has the following Parameters, 

Now select show SAQL and edit your query, were going to need some calculations on our data to calculate the different points on the Gauge for High Medium and Low.

In this example i've chosen to use 80% and 60% to calculate the High and Mid points of my chart.

This generates our Target step that we can bind these values to the gauge widget. as a final step add the filters to your step to ensure your query stays in lock step with any other filters on your dashboard. as were now using SAQL i use the serialization binds for filter of .asEquality

Ive added 3 filters to my dashboard. The State, the Sales Manager and the Account Name.

q = filter q by {{column(STATE_1.selection,[\"STATE\"]).asEquality(\"STATE\")}};

q = filter q by {{column(SalesManagers.selection,[\"ACCOUNT_OWNER\"]).asEquality(\"ACCOUNT_OWNER\")}};

q = filter q by {{column(Channel_2.selection,[\"ACCOUNT_NAME\"]).asEquality(\"ACCOUNT_NAME\")}}; 

Binding it all together

Finally I need to bind the target points to the widget,  with the GA release of the dashboard builder you can now bind values to any properties of a widget.  We need to make sure we use the right serialization to ensure the result from our query exactly matches the required output of our step to avoid getting a invalid configuration file. 

Because i want the exact value, and there is no array brackets required for the values we use the .asString. 

Ive chosen to use cell and the refernce to ensure I can only ever return a single value to the widget.

"{{cell(TARGET_POINTS.result, 0, \"sum_Target\").asString()}}", 

Breaking this down its saying, get me a single value (cell), from the result of the step TARGET_POINTS, get me the first value if this in array (many rows), then return the value sum_Target as a string. 

            "chart_12": {
                "parameters": {
                    "max": "{{cell(TARGET_POINTS.result, 0, \"sum_Activities\").asString()}}",
                    "medium": "{{cell(TARGET_POINTS.result, 0, \"sum_MidActivities\").asString()}}",
                    "high": "{{cell(TARGET_POINTS.result, 0, \"sum_HighActivities\").asString()}}",
                    "min": 0,

Now your gauges bind and dynamically change as you filter your dashboard.