1

I have a list selection for Production Date (Year--Month for ease of selection). I have a number that is the credits that should be filtered year to date based on the selected Production Date. I have tried bindings in compact and saql form but either get a validation error or an execution error.

I would appreciate any advice.

//THIS IS THE SELECTOR

"listselector_3": {
    "parameters": {
        "compact": false,
        "displayTemplate": [
            "Period_End_Date__c_Year~~~Period_End_Date__c_Month"
        ],
        "exploreLink": true,
        "instant": true,
        "measureField": "count",
        "step": "Production_Date",
        "title": "Production Date"
    },
    "type": "listselector"

//THIS IS THE STEP

"Production_Date": {  
    "broadcastFacet": true,  
    "datasets": [  
        {  
            "id": "0Fb1W0000000ravSAA",  
            "label": "XCredits",  
            "name": "XCredits",  
            "url": "/services/data/v43.0/wave/datasets/0Fb1W0000000ravSAA"  
        }  
    ],
    "isGlobal": false,
    "query": {
        "measures": [
            [
                "count",
                "*"
            ]
        ],
        "groups": [
            [
                "Period_End_Date__c_Year",
                "Period_End_Date__c_Month"
            ]
        ]
    },
    "receiveFacet": true,
    "selectMode": "single",
    "type": "aggregateflex",
    "useGlobal": true,
    "visualizationParameters": {
        "parameters": {
            "autoFitMode": "keepLabels",
            "showValues": true,
            "bins": {
                "breakpoints": {
                    "high": 100,
                    "low": 0
                },
                "bands": {
                    "high": {
                        "color": "#008000",
                        "label": ""
                    },
                    "low": {
                        "color": "#B22222",
                        "label": ""
                    },
                    "medium": {
                        "color": "#ffa500",
                        "label": ""
                    }
                }
            },
            "legend": {
                "descOrder": false,
                "showHeader": true,
                "show": true,
                "customSize": "auto",
                "position": "right-top",
                "inside": false
            },
            "axisMode": "multi",
            "tooltip": {
                "showBinLabel": true,
                "measures": "",
                "showPercentage": true,
                "showDimensions": true,
                "showMeasures": true,
                "customizeTooltip": false,
                "dimensions": ""
            },
            "visualizationType": "hbar",
            "title": {
                "fontSize": 14,
                "subtitleFontSize": 11,
                "label": "",
                "align": "center",
                "subtitleLabel": ""
            },
            "binValues": false,
            "trellis": {
                "flipLabels": false,
                "showGridLines": true,
                "size": [
                    100,
                    100
                ],
                "enable": false,
                "type": "x",
                "chartsPerLine": 4
            },
            "columnMap": {
                "trellis": [],
                "dimensionAxis": [
                    "Period_End_Date__c_Year~~~Period_End_Date__c_Month"
                ],
                "plots": [
                    "count"
                ]
            },
            "measureAxis2": {
                "sqrtScale": false,
                "showTitle": true,
                "showAxis": true,
                "title": "",
                "customDomain": {
                    "showDomain": false
                }
            },
            "measureAxis1": {
                "sqrtScale": false,
                "showTitle": true,
                "showAxis": true,
                "title": "",
                "customDomain": {
                    "showDomain": false
                }
            },
            "theme": "wave",
            "dimensionAxis": {
                "showTitle": true,
                "customSize": "auto",
                "showAxis": true,
                "title": "",
                "icons": {
                    "useIcons": false,
                    "iconProps": {
                        "fit": "cover",
                        "column": "",
                        "type": "round"
                    }
                }
            },
            "applyConditionalFormatting": true
        },
        "type": "chart",
        "options": {}
    }
},

//THIS IS THE DISPLAYED NUMBER

"Production_Date": {
    "broadcastFacet": true,
    "datasets": [
        {
            "id": "0Fb1W0000000ravSAA",
            "label": "XCredits",
            "name": "XCredits",
            "url": "/services/data/v43.0/wave/datasets/0Fb1W0000000ravSAA"
        }
    ],
    "isGlobal": false,
    "query": {
        "measures": [
            [
                "count",
                "*"
            ]
        ],
        "groups": [
            [
                "Period_End_Date__c_Year",
                "Period_End_Date__c_Month"
            ]
        ]
    },
    "receiveFacet": true,
    "selectMode": "single",
    "type": "aggregateflex",
    "useGlobal": true,
    "visualizationParameters": {
        "parameters": {
            "autoFitMode": "keepLabels",
            "showValues": true,
            "bins": {
                "breakpoints": {
                    "high": 100,
                    "low": 0
                },
                "bands": {
                    "high": {
                        "color": "#008000",
                        "label": ""
                    },
                    "low": {
                        "color": "#B22222",
                        "label": ""
                    },
                    "medium": {
                        "color": "#ffa500",
                        "label": ""
                    }
                }
            },
            "legend": {
                "descOrder": false,
                "showHeader": true,
                "show": true,
                "customSize": "auto",
                "position": "right-top",
                "inside": false
            },
            "axisMode": "multi",
            "tooltip": {
                "showBinLabel": true,
                "measures": "",
                "showPercentage": true,
                "showDimensions": true,
                "showMeasures": true,
                "customizeTooltip": false,
                "dimensions": ""
            },
            "visualizationType": "hbar",
            "title": {
                "fontSize": 14,
                "subtitleFontSize": 11,
                "label": "",
                "align": "center",
                "subtitleLabel": ""
            },
            "binValues": false,
            "trellis": {
                "flipLabels": false,
                "showGridLines": true,
                "size": [
                    100,
                    100
                ],
                "enable": false,
                "type": "x",
                "chartsPerLine": 4
            },
            "columnMap": {
                "trellis": [],
                "dimensionAxis": [
                    "Period_End_Date__c_Year~~~Period_End_Date__c_Month"
                ],
                "plots": [
                    "count"
                ]
            },
            "measureAxis2": {
                "sqrtScale": false,
                "showTitle": true,
                "showAxis": true,
                "title": "",
                "customDomain": {
                    "showDomain": false
                }
            },
            "measureAxis1": {
                "sqrtScale": false,
                "showTitle": true,
                "showAxis": true,
                "title": "",
                "customDomain": {
                    "showDomain": false
                }
            },
            "theme": "wave",
            "dimensionAxis": {
                "showTitle": true,
                "customSize": "auto",
                "showAxis": true,
                "title": "",
                "icons": {
                    "useIcons": false,
                    "iconProps": {
                        "fit": "cover",
                        "column": "",
                        "type": "round"
                    }
                }
            },
            "applyConditionalFormatting": true
        },
        "type": "chart",
        "options": {}
    }
},

//THIS IS THE DISPLAY STEP - I want this chart filtered based on date selector above -- For example, if 2018-02 is selected then filter should include records from 1/1/18 to 2/28/18. If 2017-12 is selected, then filter should include records from 1/1/17 to 12/31/17

"YTD_Credits_2": {
"broadcastFacet": true,
"datasets": [
    {
        "id": "0Fb1W0000000ravSAA",
        "label": "XCredits",
        "name": "XCredits",
        "url": "/services/data/v43.0/wave/datasets/0Fb1W0000000ravSAA"
    }
],
"isGlobal": false,
"label": "YTD Credits",
"query": {
    "measures": [
        [
            "sum",
            "Credit_Amount__c"
        ]
    ],
    "filters": [  //I WANT THIS TO FILTER YTD BASED ON THE SELECTED DATE (YEAR-MONTH) IN LISTSELECTOR 5
        [
            "Period End Date",
            [
                [
                    [
                        "year",
                        0
                    ],
                    [
                        "year",
                        0
                    ]
                ]
            ],
            ">=<="
        ]
    ]
},
"receiveFacet": true,
"selectMode": "single",
"type": "aggregateflex",
"useGlobal": true,
"visualizationParameters": {
    "parameters": {
        "autoFitMode": "keepLabels",
        "showValues": true,
        "bins": {
            "breakpoints": {
                "high": 100,
                "low": 0
            },
            "bands": {
                "high": {
                    "color": "#008000",
                    "label": ""
                },
                "low": {
                    "color": "#B22222",
                    "label": ""
                },
                "medium": {
                    "color": "#ffa500",
                    "label": ""
                }
            }
        },
        "legend": {
            "descOrder": false,
            "showHeader": true,
            "show": true,
            "customSize": "auto",
            "position": "right-top",
            "inside": false
        },
        "axisMode": "multi",
        "tooltip": {
            "showBinLabel": true,
            "measures": "",
            "showPercentage": true,
            "showDimensions": true,
            "showMeasures": true,
            "customizeTooltip": false,
            "dimensions": ""
        },
        "visualizationType": "hbar",
        "title": {
            "fontSize": 14,
            "subtitleFontSize": 11,
            "label": "",
            "align": "center",
            "subtitleLabel": ""
        },
        "binValues": false,
        "trellis": {
            "flipLabels": false,
            "showGridLines": true,
            "size": [
                100,
                100
            ],
            "enable": false,
            "type": "x",
            "chartsPerLine": 4
        },
        "columnMap": {
            "trellis": [],
            "dimensionAxis": [],
            "plots": [
                "sum_Credit_Amount__c"
            ]
        },
        "measureAxis2": {
            "sqrtScale": false,
            "showTitle": true,
            "showAxis": true,
            "title": "",
            "customDomain": {
                "showDomain": false
            }
        },
        "measureAxis1": {
            "sqrtScale": false,
            "showTitle": true,
            "showAxis": true,
            "title": "",
            "customDomain": {
                "showDomain": false
            }
        },
        "theme": "wave",
        "dimensionAxis": {
            "showTitle": true,
            "customSize": "auto",
            "showAxis": true,
            "title": "",
            "icons": {
                "useIcons": false,
                "iconProps": {
                    "fit": "cover",
                    "column": "",
                    "type": "round"
                }
            }
        },
        "applyConditionalFormatting": true
    },
    "type": "chart",
    "options": {}
}
},

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.