Forum Discussion
kasife
2 years agoHelper 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 ...
- 2 years ago
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
2 years agoSuper 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.
kasife
2 years agoHelper V
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.