Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get inspired! Check out the entries from the Power BI DataViz World Championships preliminary rounds and give kudos to your favorites. View the vizzies.

Reply
sam_nik12345
Helper II
Helper II

DIVIDE function

How to use DIVID function to create a custom column by dividing values from other table.

 

sample table as below. I want to divide qty from one table to qty from other table and create a custome column.

materialqty
matrl1123
matrl2123
matrl3123
matrl4123
matrl5123
matrl6123
matrl7123
matrl8123
matrl9123

 

 

forecastqty
matrl112
matrl213
matrl314
matrl415
matrl516
matrl617
matrl718
matrl819
matrl920

 

I have tried doing with = DIVIDE('table1'[qty],'table2'[qty]), but that did not work.

1 ACCEPTED SOLUTION
Jihwan_Kim
Super User
Super User

Hi,

Please check the below picture and the attached pbix file.

It is for creating a calculated column.

 

Picture3.png

 

Calculated Column CC =
DIVIDE (
Material[qty],
MAXX (
FILTER ( Forecast, Forecast[forecast] = Material[material] ),
Forecast[qty]
)
)

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Visit my LinkedIn page by clicking here.


Schedule a meeting with me to discuss further by clicking here.

View solution in original post

5 REPLIES 5
ALLUREAN
Solution Sage
Solution Sage

Hi, @sam_nik12345 

 

You can try using this measure then later you can use it dynamically:

DIVIDE(SUM('table1'[qty]), SUM('table2'[qty]))

Please check the file below:

https://www.dropbox.com/s/39i7cni6kpqv142/DIVIDE%20function.pbix?dl=0

 

Did I answer your question? Please Like and Mark my post as a solution if it solves your issue. Thanks.

Appreciate your Kudos !!!

https://allure-analytics.com/

https://www.youtube.com/channel/UCndD_QZVNB_JWYLEmP6KrpA

 

 




Did I answer your question? Mark my post as a solution!


https://allure-analytics.com/
https://www.youtube.com/channel/UCndD_QZVNB_JWYLEmP6KrpA
https://www.linkedin.com/company/77757292/

Proud to be a Super User!




Jihwan_Kim
Super User
Super User

Hi,

Please check the below picture and the attached pbix file.

It is for creating a calculated column.

 

Picture3.png

 

Calculated Column CC =
DIVIDE (
Material[qty],
MAXX (
FILTER ( Forecast, Forecast[forecast] = Material[material] ),
Forecast[qty]
)
)

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Visit my LinkedIn page by clicking here.


Schedule a meeting with me to discuss further by clicking here.

amitchandak
Super User
Super User

@sam_nik12345 , first create a common dimension  and join with both tables on material

material = distinct(union(distinct(table1[material]), distinct(table2[forecast])))

 

Then create a measure line 

 

Ratio =DIVIDE(sum('table1'[qty]),sum('table2'[qty]))

 

and analyze it against common dimesion material 

Bridge Table: https://www.youtube.com/watch?v=Bkf35Roman8&list=PLPaNVDMhUXGaaqV92SBD5X2hk3TMNlHhb&index=19

 

 

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Hi @amitchandak , measure line in dimension table (material) as an added column?

@sam_nik12345 , the measure is independent of tables, so you can create anywhere. You need display against common dimension

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code FABINSIDER for a $400 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

Check out the February 2025 Power BI update to learn about new features.

March2025 Carousel

Fabric Community Update - March 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors