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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
ybatistamayo
Helper III
Helper III

QQQWQQ

I have two tables, one of "Cost" and one of "Taxes", in the latter the "tax" column is updated every year.
also the column that I have to relate both tables is "IDCOST".
The first problem is that I tried the "Many to many" relationship and it didn't work.
I want to relate both tables to get a final result as shown.
that is, calculate the tax according to the year of the date column.

1 ACCEPTED SOLUTION
MFelix
Super User
Super User

Hi @ybatistamayo ,

 

You need to create a table with unique values for IDCOST and then pass the relationship of both table by this making  many-to-many become two one-to-many  and then you are abble to have the calculation.

 

Regards,

MFelix


Regards

Miguel Félix


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

Proud to be a Super User!

Check out my blog: Power BI em Português



View solution in original post

2 REPLIES 2
v-joesh-msft
Solution Sage
Solution Sage

Hi @ybatistamayo ,

If none of the tables selected for the relationship has unique values, you can refer to this article:

https://blogs.technet.microsoft.com/cansql/2016/12/19/relationships-in-power-bi-fixing-one-of-the-co...

"We first need to create a new query, appending values from both existing ones: in the query editor, Home tab, select Append Query as New."

1.PNG

 

MFelix
Super User
Super User

Hi @ybatistamayo ,

 

You need to create a table with unique values for IDCOST and then pass the relationship of both table by this making  many-to-many become two one-to-many  and then you are abble to have the calculation.

 

Regards,

MFelix


Regards

Miguel Félix


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

Proud to be a Super User!

Check out my blog: Power BI em Português



Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.