Forum Discussion
madji
Helper I
8 years agomultiply 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] ) )Best Regards,
Dale
6 Replies
- Greg_Deckler
Community Champion
- madji
Helper I
https://yadi.sk/d/OwlJzzG33QPaZV
Link to my examle.
And I think total is not correct. I want to see sum 50 + 1400
- v-jiascu-msft
Microsoft Employee
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] ) )Best Regards,
Dale