cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
birgirs Frequent Visitor
Frequent Visitor

Multiply value in each row with the total number from another column

hi guys 

 

need some Dax help

i need to multiply col1 with the total numer from col2(130) and show that in col3  

 

col1 col2  col3

0,1   20      0,1*130

0,2   30      0,2*130

0,4   50      0,4*130

0,1   10      0,1*130

0,2   20      0,2*130    

 

1 ACCEPTED SOLUTION

Accepted Solutions
ChrisMendoza Established Member
Established Member

Re: Multiply value in each row with the total number from another column

3 REPLIES 3
Interkoubess Established Member
Established Member

Re: Multiply value in each row with the total number from another column

Hi @birgirs,

 

Please try this formula in a calcultaed field ( I called my table Table1):

 

[Col1]*CALCULATE(SUMX(Table1,[Col2]),ALL(Table1))

 

Hope it helps...

 

Ninter

Highlighted
birgirs Frequent Visitor
Frequent Visitor

Re: Multiply value in each row with the total number from another column

no that did not work 

there are more columns 

and if i want to filter by "kiwi" then it is multiplying all of col3 (260) but i only want total for the selected filter 

 

 

col1 col2  col3        col4

0,1   20      0,1*130  apples

0,2   30      0,2*130  apples

0,4   50      0,4*130  apples

0,1   10      0,1*130  apples

0,2   20      0,2*130  apples

0,1   20      0,1*130  Kiwi

0,2   30      0,2*130  Kiwi

0,4   50      0,4*130  Kiwi

0,1   10      0,1*130  Kiwi

0,2   20      0,2*130  Kiwi

ChrisMendoza Established Member
Established Member

Re: Multiply value in each row with the total number from another column