Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code FABINSIDER for a $400 discount.
Register nowGet inspired! Check out the entries from the Power BI DataViz World Championships preliminary rounds and give kudos to your favorites. View the vizzies.
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.
material | qty |
matrl1 | 123 |
matrl2 | 123 |
matrl3 | 123 |
matrl4 | 123 |
matrl5 | 123 |
matrl6 | 123 |
matrl7 | 123 |
matrl8 | 123 |
matrl9 | 123 |
forecast | qty |
matrl1 | 12 |
matrl2 | 13 |
matrl3 | 14 |
matrl4 | 15 |
matrl5 | 16 |
matrl6 | 17 |
matrl7 | 18 |
matrl8 | 19 |
matrl9 | 20 |
I have tried doing with = DIVIDE('table1'[qty],'table2'[qty]), but that did not work.
Solved! Go to Solution.
Hi,
Please check the below picture and the attached pbix file.
It is for creating a calculated column.
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.
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://www.youtube.com/channel/UCndD_QZVNB_JWYLEmP6KrpA
Proud to be a Super User!
Hi,
Please check the below picture and the attached pbix file.
It is for creating a calculated column.
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.
@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
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
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code FABINSIDER for a $400 discount!
Check out the February 2025 Power BI update to learn about new features.
User | Count |
---|---|
126 | |
115 | |
69 | |
62 | |
46 |