cancel
Showing results for
Did you mean:
Highlighted
Helper I

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 3000 6000 86,96% Google 2500 7000 121,74% Twitter 2500 5000 86,96% Total 10000 23000 100,00% (=C6/\$C\$6/(B6/\$B\$6))

Tomas

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Super User III

Re: dax divide multiple columns

Please refer a screen shot attached:

Don't forget to give thumbs up and accept this as a solution if it helped you!!!

Please take a quick glance at newly created report:
My Report
4 REPLIES 4
Highlighted
Super User IX

Re: dax divide multiple columns

@tomasmartinek , 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))

Proud to be a Super User!

Highlighted
Super User III

Re: dax divide multiple columns

Please refer a screen shot attached:

Don't forget to give thumbs up and accept this as a solution if it helped you!!!

Please take a quick glance at newly created report:
My Report
Highlighted
Helper I

Re: dax divide multiple columns

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)``````

Highlighted
Super User IX

Re: dax divide multiple columns

@tomasmartinek - Is that really how your data looks? You can't refer to individual cells in DAX, you have to filter down from rows and columns.

---------------------------------------

I have a NEW book! DAX Cookbook from Packt
Over 120 DAX Recipes!

Proud to be a Super User!

Announcements

Power Platform Community Conference

Check out the on demand sessions that are available now!

Experience what’s next for Power BI

See the latest Power BI innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021