Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

Many to Many Relationship / Bridge

Hi everyone,

 

I am working with a sales file and a quote file that can only be related many to many. I need to reference columns in each and compare them using an if statement. To combat the issue of not being able to do that directly I created a "bridge" table with each product, quantity, and a customer column from each table into a merged table. I then compared all three columns with one another and made a new column that says "Won" if true else "Loss". 

 

I am having an issue now when I am trying to calculate the win rate percentage between each part. The win rate is calculated by number of sales / number of quotes. It's a simple formula, but when I apply my filtered slicers the total win measure (

Total Win = COUNTROWS(FILTER('QuoteSalesMerge','QuoteSalesMerge'[Match]="Won"))) will not change whereas the total quote count will. I believe this is because of the merged table as the total quote count references the quote file and has no problem.
 
 

For example whenever I filter by a product the Count of Quote No. will change, but the Total Win will not.

 

Is there something I can do to change this?

 

Thank you for any help.

  • Anonymous 

    What you want to do is set up a star schema with a product table and a customer table that link to your sales table and quote table.  They you can write measures using fields from sales and quotes and show it grouped on attributes from the product table.

     

3 Replies

  • Anonymous 

    What you want to do is set up a star schema with a product table and a customer table that link to your sales table and quote table.  They you can write measures using fields from sales and quotes and show it grouped on attributes from the product table.

     

    • Anonymous's avatar
      Anonymous
      Not applicable

      I love you