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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

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
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.