Forum Discussion
Anonymous
7 years agoNot applicable
subtractung average column value from another column values
I have 2 columns col1 col2 22 27 42 48 20 19 28 36 25 35 I need added col3. the values of col3 is col2-avg(col1) i.e avg of col1 is 27.4 col3 values are 27-27....
- 7 years ago
Hi,
Drag Col1 and Col2 fields to the row labels section of your Table/Matrix visual and write this measure
=MIN(Table1[Col2])-CALCULATE(AVERAGE(Table1[Col1]),ALL(Table1))
Hope this helps.
Anonymous
7 years agoNot applicable
HI Anonymous
Try this approach:
Measure = VAR vCol1_Avg =CALCULATE(AVERAGE(Table1[Col1]),ALLSELECTED(Table1)) VAR vCol2_val = MAX(Table1[Col2]) RETURN vCol2_val - vCol_Avg
Thanks
Raj