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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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