Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

3 category feeds - valid solution?

Hi everybody,


we were trying to get more distinguishable category feeds working with the categorical input (3 dimension feeds, 1 measure feed) and after some tinkering we came up with a solution. We want to do this, because we need the assignment of dimensions to three different feeds, so they are displayed on different axis.

 

The solution below gives us exactly the result we want!

 

BUT: We didn't find anything in the docs, if this setup is valid by any means. We heard from another source, that nested categories are not supported by Power BI. Now we are unsure, if using this is some kind of hack (or bug) or if this is valid and we can rely on it. That this is not gonna break in the future is very important, as it would be catastrophic for our customers.

 

So my question to you Power BI guys is: Is the setup below OK and valid? Can we be sure, this is gonna work in future API versions as well?

 

We are defining the dataRoles and dataViewMappings like this:

{
    ...
    "dataRoles": [
        {
            "displayName": "Rows",
            "name": "rowCategory",
            "kind": "Grouping"
        },
        {
            "displayName": "Columns",
            "name": "colCategory",
            "kind": "Grouping"
        },
        {
            "displayName": "Grouping",
            "name": "multiples",
            "kind": "Grouping"
        },
        {
            "displayName": "Measures",
            "name": "measure",
            "kind": "Measure"
        }
    ],
	...
	"dataViewMappings": [
        {
            "categorical": {
                "categories": {
                    "for": { "in": "rowCategory" }
                },
                "values": {
                    "group": {
                        "by": "colCategory",
                        "select":[
                            { "bind": { "to": "measure" } },
                            { "bind": { "to": "multiples" } }
                        ]
                    }
                }
            }
        },
        {
            "categorical": {
                "categories": {
                    "for": { "in": "multiples" }
                },
                "values": {
                    "group": {
                        "by": "colCategory",
                        "select":[
                            { "bind": { "to": "measure" } },
                            { "bind": { "to": "multiples" } }
                        ]
                    }
                }
            }
        }
    ]
}

 The output is something like below, having two categories for two dimensions/feeds and the third dimension/feed is used for value grouping.

...
	"dataViews: [{
        "tree": null, "table": null, "matrix": null, "single": null, "metadata": {
			"columns": [...]
		}, "categorical": {
			categories: [
				{...},
				{...}
			],
			"values": [
				{...},
				{...},
				{...}
			]
		}
	}]
...

 

 

1 REPLY 1
Anonymous
Not applicable

Hi @Anonymous ,

I'm sorry that I couldn't find the relevant official documents to explain whether nested categories are supported or not. But now that this can work normally, it means it is supported. As for whether there is any potential problem or bug in the future, this is hard to say...

Best Regards

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.