Forum Discussion

sam_nik12345's avatar
sam_nik12345
Helper II
4 years ago
Solved

multiplying values from other table

I want to add another column in table 1 by multiplying values from table2. How can I achieve this?

Kinldy help.

 

table1:

monthvalue
jan2
feb3
mar5

table2:

xx21
xx32
xx43
  • Hi, sam_nik12345 ;

    You could create a column as follows:

    Column = [value]* CALCULATE(SUM('Table (2)'[value]),FILTER('Table (2)',RANKX('Table (2)',[index],,ASC)= RANKX('Table',[month],,ASC)))

    The final output is shown below:

    If you multiply the rows of the first table by the rows of the second table, how can you determine which row is the corresponding row.can you tell me your logic?


    Best Regards,
    Community Support Team_ Yalan Wu
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

3 Replies

    • sam_nik12345's avatar
      sam_nik12345
      Helper II

      Hi amitchandak 

      This formula New column in Table 1 = [value] * sum(Table2[value]) is working but it is multiplying sum(table2) with each row of table1.

      I want to create a column with row * row from the tow tables. Can you you please suggest?

      table1:

      monthvalue
      jan2
      feb3
      mar5

      table2:

      xx21
      xx32
      xx43
  • v-yalanwu-msft's avatar
    v-yalanwu-msft
    Community Support

    Hi, sam_nik12345 ;

    You could create a column as follows:

    Column = [value]* CALCULATE(SUM('Table (2)'[value]),FILTER('Table (2)',RANKX('Table (2)',[index],,ASC)= RANKX('Table',[month],,ASC)))

    The final output is shown below:

    If you multiply the rows of the first table by the rows of the second table, how can you determine which row is the corresponding row.can you tell me your logic?


    Best Regards,
    Community Support Team_ Yalan Wu
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.