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

The Fabric community is upgrading! Read all of the details including the timeline and what you can expect. Learn more

Reply
Anonymous
Not applicable

Problem with reading data from dataview

I have my capabilities.json as follow:

 

{
    "dataRoles": [
        {
            "displayName": "Origine",
            "name": "category",
            "kind": 0
        },
        {
            "displayName": "Volume",
            "name": "measure",
            "kind": 1
        },
        {
            "displayName": "Age",
            "name": "age",
            "kind": 1
        }
    ],
    "dataViewMappings": [
        {
            "conditions": [
                {
                    "category": {
                        "max":1
                    },
                    "mesure": {
                        "max":1
                    },
                    "age":{
                        "max":1
                    }
                }
            ],

            "categorical": {
                "categories": {
                    "for": {
                        "in": "category"
                    }
                },
                "single": {
                    "for": {
                        "in": "age"
                    }
                },
                "values": {
                    "select": [
                        {
                            "bind": {
                                "to": "measure"
                            }
                        }
                    ]
                }
            },
            "single" : {
                "role":""
            }    
        }
    ],

i'm trying to read the the data "age" but I couldn't achieve this.

here is the way with which I'm trying to read the data:

 

            console.log(options.dataViews[0]);
            console.log(options.dataViews[0].categorical.maps);
1 REPLY 1
v-chuncz-msft
Community Support
Community Support

@Anonymous,

 

The above capabilities.json is not valid. You may check the API at https://github.com/Microsoft/PowerBI-visuals-tools/blob/master/templates/visuals/.api/v1.7.0/schema.....

Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.