Forum Discussion

NickPeterson2's avatar
NickPeterson2
Frequent Visitor
7 years ago
Solved

Multiply two columns - different tables - with relationship - getting blanks

Hi,

 

Even though I seem to follow all the rules to miltiply columns from different tables.. I am stuck getting blanks

 

 

Example:

 

I used 'Table1'[A] * RELATED('Table2'[B]) .

 

 

However, Power Bi doesn't like the values of column B and I get blanks.

 

I have established a 1:1 relationship between A and B 

 

*Values are formatted as numbers

**I've used isblank for both columns and I know that the problem is in column B. 

 

More info:

 

 multiplication

relationshipChance of Fault Tabledataset sheet1dataset sheet2

 

 

Thank you for your time .. really stuck in here ..

 

  • Hi NickPeterson2,

     

    What is the final result you want to achieve?

     

    First of all when you create a relationship between two table they have to have similar data to be connected in your case the information is not matching on both sides so when you make a multiplication the resul is null since there are no common data between both tables.

     

    When you pick up table 1and just looking at the numbers you have:

    500 , 400 , 600, 800, 120 

    10, 12, 11, 14, 15 

     

    On table 2 you have 5, 6 , 7 ,8, 9 no common numer so it's not possible to create a relationship.

     

    You need to create relationships when you want to get information for one table to the other and there are commom data in .

     

    Check the documentation about relationships to get a understanding of them.

     

    However it does not seem to me that you need a relationship for your purpose. Can you share what you want to achieve and how you want to calculate things?

     

    Regards,

    MFelix

3 Replies

  • Hi NickPeterson2,

     

    What is the final result you want to achieve?

     

    First of all when you create a relationship between two table they have to have similar data to be connected in your case the information is not matching on both sides so when you make a multiplication the resul is null since there are no common data between both tables.

     

    When you pick up table 1and just looking at the numbers you have:

    500 , 400 , 600, 800, 120 

    10, 12, 11, 14, 15 

     

    On table 2 you have 5, 6 , 7 ,8, 9 no common numer so it's not possible to create a relationship.

     

    You need to create relationships when you want to get information for one table to the other and there are commom data in .

     

    Check the documentation about relationships to get a understanding of them.

     

    However it does not seem to me that you need a relationship for your purpose. Can you share what you want to achieve and how you want to calculate things?

     

    Regards,

    MFelix

    • NickPeterson2's avatar
      NickPeterson2
      Frequent Visitor

      Hi Thank you both for your answers .

       

      It solved the problem by creating a primary key for every table.

       

       

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi NickPeterson2,

     

    According to your description, your relationships mode is 'one to one'. Actually, your tables not has any available fields value to mapping records.

    For this scenario, I think it may use blank as relationship key to link two tables, so your calculated column will get blank result.

    If your tables are mapping based on row number, I'd like to suggest you add index to both two table then use index to link two tables.

     

    Regards,

    Xiaoxin Sheng