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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
kasife
Helper V
Helper V

Validate bridge table

Hi Guys,

I created a guide to create a bridge table, but I'm not sure if it's correct. Because this measure ends up giving me all the possibilities between the two dimension tables. What would be the way to do this correctly?

 

    SELECTCOLUMNS(
        CROSSJOIN(projetosReaal, _corretores),
        "ID_projetos", projetos[idempreendimento],
        "ID_corretores", _corretores[idcorretor]
    )

 

1 ACCEPTED SOLUTION

 

Total brokers = COUNTROWS(DISTINCT(UNION(
    SELECTCOLUMNS(Leads,"Broker",[idcorretor]),
    SELECTCOLUMNS(pastas,"B",[idcorretor]),
    SELECTCOLUMNS(ccvs,"B",[idcorretor]),
    SELECTCOLUMNS(Repasses,"B",[idcorretor]))))

// distinct count of brokers that are in the tables: Leads, pastas, ccvs and repasses
// The tables are related by ID, but the broker count must be by name

 

View solution in original post

10 REPLIES 10
lbendlin
Super User
Super User

I created a guide to create a bridge table

why would you do that? 🙂 Is there a solid business reason behind that?

 

What you are doing is re-inventing SUMMARIZECOLUMNS with unrelated tables

 

Read about TREATAS - it's a way to project filters from one table to another, especially if they are not related.

@lbendlin  I would like to do this because my dimension tables are many to many. In this case, for example, I can have one or more projects for each broker and I can have one or more brokers for each project. I need to do some calculations that involve, for example, counting brokers per project, etc. I don't know if there was another way to do this.

It might be better to do that via the common fact table. 

 

Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).

Do not include sensitive information or anything not related to the issue or question.

If you are unsure how to upload data please refer to https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-...

Please show the expected outcome based on the sample data you provided.

Want faster answers? https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447...

@lbendlinI created a model to try and better show what I would like to achieve. But I have two dimension tables and I need to use both to make some measurements. For example: the sale of each broker per project, the Total of brokers per project. etc...Follow the link below with the file
https://ufile.io/liju6ybx

Your projects table is not a proper dimension table.  Try to normalize it.

 

lbendlin_0-1708875212181.png

 

@lbendlin Okay, I'll do that, but Assuming it was normalized, how would I get the result?

Please provide sample data that fully covers your issue.
Please show the expected outcome based on the sample data you provided.

@lbendlin I tried to do it in a way that can convey what I need. I also tried to adjust the modeling.
https://ufile.io/plitf8og

kasife_0-1708922924004.png

 

 

Total brokers = COUNTROWS(DISTINCT(UNION(
    SELECTCOLUMNS(Leads,"Broker",[idcorretor]),
    SELECTCOLUMNS(pastas,"B",[idcorretor]),
    SELECTCOLUMNS(ccvs,"B",[idcorretor]),
    SELECTCOLUMNS(Repasses,"B",[idcorretor]))))

// distinct count of brokers that are in the tables: Leads, pastas, ccvs and repasses
// The tables are related by ID, but the broker count must be by name

 

@lbendlin Thank you so much for help the solution.

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.

Top Solution Authors