Putting a “Last Updated date” on a Dashboard

Goal: display the last updated date of the dataset you're using

1) Include the “LastModifiedDate” field in your dataset coming from Salesforce.

2) create a new step to to be able to get the last modified date (it doesn't have to be a complicated one like this)

            "ActivityLastUpdateStep": {
                "datasets": [
                        "id": "0Fb30000000TNFvCAO",
                        "label": "SE_Activity",
                        "name": "SE_Activity",
                        "url": "/services/data/v42.0/wave/datasets/0Fb30000000TNFvCAO"
                "isFacet": true,
                "isGlobal": false,
                "query": {
                    "measures": [
                    "pigql": "q = load \"SE_Activity\";
                    q = filter q by 'Owner.ManagerL01.Name' == \"Marc Benioff\";
                    q = group q by 'Owner.ManagerL01.Name';
                    q = foreach q generate 'Owner.ManagerL01.Name' as 'Owner.ManagerL01.Name',
                    toString(toDate(max('LastModifiedDate_sec_epoch')),\"dd MMM yyyy HH:mm\") as 'LastUpdate';",
                    "groups": [
                    "filters": []
                "selectMode": "single",
                "type": "aggregate",
                "useGlobal": true,
                "visualizationParameters": {
                    "options": {},
                    "visualizationType": "hbar"
        "widgetStyle": {
            "backgroundColor": "#FFFFFF",
            "borderColor": "#E6ECF2",
            "borderEdges": [],
            "borderRadius": 0,
            "borderWidth": 1

3) create a new text box and then go into the Dashboard json to replace the empty text with a “Binding” to display the information you grabbed above:

            "text_7": {
                "parameters": {
                    "fontSize": 10,
                    "text": "(Dataset Last Updated: {{cell(ActivityLastUpdateStep.result, 0, \"LastUpdate\").asString()}})",
                    "textAlignment": "right",
                    "textColor": "#FFFFFF"
                "type": "text"

Leave a Reply

Your email address will not be published. Required fields are marked *