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

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

Reply
bkimmel
Advocate I
Advocate I

Custom Visual - Fields Only Aggregates?

Hey guys,

 

I'm writing a custom map visual, and I'm having a problem where all but one of my fields are aggregating the data in them no matter what I do. I'm trying to draw a flow diagram from a set of suppliers to customers, but with all of the destination data aggregated, it's prety worthless. The dataset has a table that holds the name and lat/long of the supplier and a similar table for the customer. The tables are then linked by a relationship defined in a third table. So, the aggregation on the origin side is fine, since there is only one value there (I would prefer it wouldn't aggregate though). But it's grouping the customer data, which is many to one, so I get a single point. image.png

 

 

Is there something I can do to make it so none of the fields get aggregated?

 

Here is my capabilities.json:

 

{
    "dataRoles": [{
            "displayName": "Origin",
            "name": "oLocation",
            "kind": "Grouping"
        },
        {
            "displayName": "Origin Latitude",
            "name": "oLat",
            "kind": "Measure"
        },
        {
            "displayName": "Origin Longitude",
            "name": "oLong",
            "kind": "Measure"
        },
        {
            "displayName": "Destination",
            "name": "dLocation",
            "kind": "Grouping"
        },
        {
            "displayName": "Destination Latitude",
            "name": "dLat",
            "kind": "Measure"
        },
        {
            "displayName": "Destination Longitude",
            "name": "dLong",
            "kind": "Measure"
        },
        {
            "displayName": "Line Width",
            "name": "value",
            "kind": "Measure"
        },
        {
            "displayName": "Tooltips",
            "name": "tooltips",
            "kind": "Measure"
        }
    ],
    "dataViewMappings": [{
        "conditions": [{
            "oLocation": {
                "max": 1
            },
            "oLat": {
                "max": 1
            },
            "oLong": {
                "max": 1
            },
            "dLocation": {
                "max": 1
            },
            "dLat": {
                "max": 1
            },
            "dLong": {
                "max": 1
            },
            "value": {
                "max": 1
            },
            "tooltips": {
                "min": 0
            }
        }],
        "categorical": {
            "categories": {
                "select": [{
                    "bind": {
                        "to": "oLocation"
                    }
                }, {
                    "bind": {
                        "to": "dLocation"
                    }
                }]
            },
            "values": {
                "select": [{
                        "bind": {
                            "to": "value"
                        }
                    }, {
                        "bind": {
                            "to": "oLat"
                        }
                    }, {
                        "bind": {
                            "to": "oLong"
                        }
                    },
                    {
                        "bind": {
                            "to": "dLat"
                        }
                    }, {
                        "bind": {
                            "to": "dLong"
                        }
                    }, {
                        "bind": {
                            "to": "tooltips"
                        }
                    }
                ]
            }
        }
    }]
}
1 ACCEPTED SOLUTION
v-viig
Community Champion
Community Champion

Hello @bkimmel,

 

I suppose it'd be better to use table data mapping instead of categorical.

Please send us .pbix file to investigate this issue deeper if this solution doesn't help.

 

Ignat Vilesov,

Software Engineer

 

Microsoft Power BI Custom Visuals

pbicvsupport@microsoft.com

View solution in original post

4 REPLIES 4
v-viig
Community Champion
Community Champion

Hello @bkimmel,

 

I suppose it'd be better to use table data mapping instead of categorical.

Please send us .pbix file to investigate this issue deeper if this solution doesn't help.

 

Ignat Vilesov,

Software Engineer

 

Microsoft Power BI Custom Visuals

pbicvsupport@microsoft.com

Thanks!

 

Switching to table solved my problem!

 

P.S. Could you guys improve the documentation around using the table data mapping? The information on the Github is pretty sparse, and I had to spend a long time trawling through other places on the internet to figure it out.

v-viig
Community Champion
Community Champion

Sure. We'll improve our documentation.

 

Ignat Vilesov,

Software Engineer

 

Microsoft Power BI Custom Visuals

pbicvsupport@microsoft.com

Thanks!

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

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.

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.

March Power BI Update Carousel

Power BI Community Update - March 2026

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