cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
jbolivar Frequent Visitor
Frequent Visitor

Field in related tables

Good morning friends.

It's the first time this happens to me because I'm learning.

I have 2 related tables as you can see in the following imagetablasrelacionadas.JPG

 

 

 

In the GTI-POWERBI table, I need a calculated column with the result of dividing the TeimpoEfectivoSolucion divided by the SLA_TORICO field of the BD_SLA table.

CamposACalcular.JPG

 

I can not bring the SLA_TEORIC field to the formula

1 ACCEPTED SOLUTION

Accepted Solutions
Super User
Super User

Re: Field in related tables

I think this might need to be:

 

New Column =
   DIVIDE(
      GTI_POWERBI[TeimpoEfectivoSolucion],
      SUMX (RELATEDTABLE(BD_SLA),BD_SLA[SLA_TORICO),
      0)

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

Proud to be a Datanaut!


5 REPLIES 5
Super User
Super User

Re: Field in related tables

From the looks of things you've got a one to many relationship - how would it know which of the SLA results to bring in?

pawel1 Member
Member

Re: Field in related tables

try this:

 

New Column =

   DIVIDE(

      GTI_POWERBI[TeimpoEfectivoSolucion],

      SUM (BD_SLA[SLA_TORICO]),

      0)

 

Super User
Super User

Re: Field in related tables

I think this might need to be:

 

New Column =
   DIVIDE(
      GTI_POWERBI[TeimpoEfectivoSolucion],
      SUMX (RELATEDTABLE(BD_SLA),BD_SLA[SLA_TORICO),
      0)

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

Proud to be a Datanaut!


Highlighted
jbolivar Frequent Visitor
Frequent Visitor

Re: Field in related tables

This solution worked but it did not give me the expected results.

Thank you.

jbolivar Frequent Visitor
Frequent Visitor

Re: Field in related tables

This solution worked and gave me the expected results.

 

However, I also made this formula and it also worked for me.

 

GTI_POWERBI[TiempoEfectivoSolucion] / CALCULATE(SUM(BD_SLA[SLA_TEORICO]);BD_SLA[SLA_TEORICO]>0)

 

Thank you.