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

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

Reply
skokov_konstant
New Member

Data view mapping in Power BI visuals

Good day

I am creating custom visualization on d3js and pbiviz for powerbi

Here is the code in capabilities.js:

 

{
    "dataRoles":[
        {
            "displayName": "HoleDepth",
            "name": "depth",
            "kind": "Grouping"
        },
        {
            "displayName": "Days",
            "name": "days",
            "kind": "Measure"
        },
        {
            "displayName": "Diametrs",
            "name": "diametrs",
            "kind": "Measure"
        },
        {
            "displayName": "Sensor1",
            "name": "sensor_1",
            "kind": "Measure"
        },
        {
            "displayName": "Sensor2",
            "name": "sensor_2",
            "kind": "Measure"
        },
        {
            "displayName": "Sensor3",
            "name": "sensor_3",
            "kind": "Measure"
        },
        {
            "displayName": "Sensor4",
            "name": "sensor_4",
            "kind": "Measure"
        }
    ],
    "dataViewMappings": [
        {
            "categorical": {
                "categories": {
                    "for": { "in": "depth" }
                },
                "values": {
                    "select":[
                        { "bind": { "to": "days" } },
                        { "bind": { "to": "diametrs" } },
                        { "bind": { "to": "sensor_1" } },
                        { "bind": { "to": "sensor_2" } },
                        { "bind": { "to": "sensor_3" } },
                        { "bind": { "to": "sensor_4" } }
                    ]
                }
            }
        }
    ]
}


But in visualization it is inconvenient to use categorical -> values array

Screenshot_1.png

 

Is it possible to categorical -> values was like an object with keys?:
GfCO8.png

0 REPLIES 0

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

February Power BI Update Carousel

Power BI Monthly Update - February 2026

Check out the February 2026 Power BI update to learn about new features.

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.

Top Solution Authors
Top Kudoed Authors