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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
Anonymous
Not applicable

Divide value according to category in other table

I have two tables, the first shows the products and their ratio. The second shows the product and their values. I wish to create a new column to calculate the converted value (value/ratio) according to the respective product category. I tried to make a one-to-many relationship from first table to second table by linking 'product'. However, it only allows many-to-many relationship and both direction. How to make it one-to-many relationship and single direction? Any help given is appreciated. Thank you.

 

First table:

A.PNG

 Second table:

B.PNG

 

Expected output:

C.PNG

 

1 ACCEPTED SOLUTION
Whitewater100
Solution Sage
Solution Sage

Hi:

I beleive answer is same (actually provide Calc Col and Measure). The main thing was to answer the relationship question. Please see attached for that part. I hope this helps..

https://drive.google.com/file/d/1n_q1I9SuwHTEZXTSTQDFjQnX39uG0BXl/view?usp=sharing 

Whitewater100_0-1652187149375.png

Measure_Converted Value = SUMX(DATA, Data[Value] / Data[Ration])
Whitewater100_1-1652187208268.png

 

 

View solution in original post

4 REPLIES 4
Whitewater100
Solution Sage
Solution Sage

Hi:

I beleive answer is same (actually provide Calc Col and Measure). The main thing was to answer the relationship question. Please see attached for that part. I hope this helps..

https://drive.google.com/file/d/1n_q1I9SuwHTEZXTSTQDFjQnX39uG0BXl/view?usp=sharing 

Whitewater100_0-1652187149375.png

Measure_Converted Value = SUMX(DATA, Data[Value] / Data[Ration])
Whitewater100_1-1652187208268.png

 

 
Anonymous
Not applicable

Did you manually type in the Prod_ID column in the Data table? 

SanketBhagwat
Solution Sage
Solution Sage

Hi @Anonymous .

You can create a summary table using "SUMMARIZE'.
You can write your DAX as ;

Test =
SUMMARIZE(Table2,Table2[Product],Table2[Value],Table1[Equivalent Ratio])
 
Then create a calculated column for Converted Value using ;
Converted_Value =
DIVIDE(Test[Value],Test[Equivalent Ratio])


See below output;
SanketBhagwat_0-1652163356806.png



Thanks,
Sanket


If this post helps, then mark it as "Accept as Solution" and give it a thumbs up.

Anonymous
Not applicable

sry but I am not sure why the table 1 does not show up in the summarize function

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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