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

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

Reply
Anonymous
Not applicable

How can i use two table data source in one visual object?

Need help!How can i use two table data source in one visual object?Code such as:

{
    "dataRoles": [
        {
            "displayName": "Category Data",
            "displayNameKey": "CategoryData",
            "name": "category",
            "kind": "Grouping"
        },
        {
            "displayName": "Category Data2",
            "displayNameKey": "CategoryData2",
            "name": "category2",
            "kind": "Grouping"
        },
        {
            "displayName": "Measure Data",
            "name": "measure",
            "kind": "Measure"
        },
        {
            "displayName": "Measure Data2",
            "name": "measure2",
            "kind": "Measure"
        }
    ],
    "dataViewMappings": [
        {
            "categorical": {
                "categories": {
                    "select": [
                        {
                            "bind": {
                                "to": "category"
                            }
                        },
                        {
                            "bind": {
                                "to": "category2"
                            }
                        }
                    ]
                },
                "values": {
                    "select": [
                        {
                            "bind": {
                                "to": "measure"
                            }
                        },
                        {
                            "bind": {
                                "to": "measure2"
                            }
                        }
                    ]
                }
            }
        }
    ]
}

But I found that in the visual object of the matrix, rows can use it(two table data source)...Why?

2 REPLIES 2
dm-p
Super User
Super User

Hi @Anonymous, and welcome aboard!

We will need a little more to go on to assist you - if you haven't seen it, I'd suggest reading this welcome post to help you get your question answered more quickly; particularly as there's very little knowledge of custom visuals development in the community, and they can be incredibly open-ended in how to approach solving challenges involving them.

Going on what you've provided, I can supply a quick response in that Power BI visuals don't support multiple sources and you have to map your fields into a single dataViewMapping. Once this has been set up, you can manipulate this using code later on in your visual's logic, which could be an option for you, but it's going to depend on what you're looking to do.

If you are able to provide a use case for what you are trying to achieve, and ideally some sample data, we can see if we can assist you with how you might try to solve this particular challenge (if it's possible).

Many thanks,

Daniel





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!


On how to ask a technical question, if you really want an answer (courtesy of SQLBI)




Greg_Deckler
Community Champion
Community Champion

Sorry, what exactly is that you posted?


Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 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.