Forum Discussion

pranshuagrawal's avatar
pranshuagrawal
Regular Visitor
4 years ago

Drilldown on multiple Grouping is working only for one Grouping

Hi,

 

This is my capabilities.json. I have removed the Objects from this since it was very long.

 

{
    "dataRoles": [{
        "displayName": "X Axis",
        "name": "xAxis",
        "kind": "Grouping"
    }, {
        "displayName": "Y Axis",
        "name": "yAxis",
        "kind": "Grouping"
    }, {
        "displayName": "Value",
        "name": "Value",
        "kind": "Measure",
        "requiredTypes": [{
            "numeric": true
        }, {
            "integer": true
        }]
    }, {
        "displayName": "Tooltip",
        "name": "tooltip",
        "kind": "Measure"
    }, {
        "displayName": "Sort",
        "name": "sort",
        "kind": "Measure"
    }],
    "drilldown": {
        "roles": ["xAxis", "yAxis"]
    },
    "dataViewMappings": [{
        "conditions": [{
            "xAxis": {
                "max": 1
            },
            "yAxis": {
                "max": 1
            },
            "Value": {
                "max": 1
            }
        }],
        "categorical": {
            "categories": {
                "for": {
                    "in": "xAxis"
                },
                "top": {
                    "count": 30
                }
            },
            "values": {
                "group": {
                    "by": "xAxis",
                    "dataReductionAlgorithm": {
                        "top": {
                            "count": 30
                        }
                    },
                    "select": [{
                        "for": {
                            "in": "yAxis"
                        }
                    }, {
                        "bind": {
                            "to": "Value"
                        }
                    }, {
                        "bind": {
                            "to": "tooltip"
                        }
                    }, {
                        "bind": {
                            "to": "sort"
                        }
                    }]
                }
            }
        }
    }],

 

 

As it can be seen that drilldown is applied on both xAxis and yAxis. When I add multiple data in xAxis and yAxis, the drill down is working fine for xAxis and I am getting the correct category in dataViews.

 

But with role yAxis, I am getting multiple categories in dataViews array and I am not able to identify which one user has drilled down/ up on.

 

Is there anyway to make it work for both the grouping?