Forum Discussion

madji's avatar
madji
Icon for Helper I rankHelper I
8 years ago
Solved

multiply two columns from diferent table

HI

I have one problem with dax.

 

How can I  multiply two cells from different table

 

For example I want to get A*B. it work, but for total is not correct.  I want to see sum 50 + 1400 

 

 

 

 

  • Hi madji,

     

    Maybe you can try this formula.

    Measure1 =
    IF (
        HASONEFILTER ( Table1[Column1] ) || HASONEFILTER ( Table2[Column1] ),
        SUM ( Table1[A] ) * SUM ( Table2[B] ),
        SUMX (
            SUMMARIZE (
                'Table1',
                'Table1'[Column1],
                'Table1'[A],
                'Table2'[B],
                "product", 'Table1'[A] * 'Table2'[B]
            ),
            [product]
        )
    )

    multiply_two_columns_from_diferent_table

     

    Best Regards,

    Dale

6 Replies