Forum Discussion
Anonymous
6 years agoNot applicable
dax divide multiple columns
Hello, I would like to create a column Result. I wrote formulas into the column. Source Price (col B) Profit (col C) Result Facebook 2000 5000 108,70% (=C2/$C$6/(B2/$B$6)) Bing 3...
- 6 years ago
Anonymous ,
Please refer a screen shot attached:
amitchandak
Super User
6 years agoAnonymous , as a new column in the table
[Price (col B)]/sum([Price (col B)])/ [Profit (col C)] /sum( [Profit (col C)])
or as a new measure
sum(Table[Price (col B)])/calculate(sum([Price (col B)]),all(Table))/ sum(Table[Profit (col C)]) /calculate(sum(Table[Profit (col C)]),all(Table))
Anonymous
6 years agoNot applicable
Anonymous,
1) You should create a calculated measure as it will be dynamic in relation to any axes of analysis you want to apply.
2) You should use the divide () function, best solution to divide numbers without generating errors.
3) If you repeat the sam DAX formula, it is best to use a variable.
Example:
Measure =
var DivideNumber = divide(sum('Table (2)'[Column1]),sum('Table (2)'[Column2]))
return
divide(DivideNumber,DivideNumber)