Forum Discussion

kasife's avatar
kasife
Helper V
2 years ago
Solved

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 ...
  • lbendlin's avatar
    lbendlin
    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