cancel
Showing results for
Did you mean:
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 image

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.

I can not bring the SLA_TEORIC field to the formula

1 ACCEPTED SOLUTION

Accepted Solutions
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)```

Proud to be a Datanaut!

5 REPLIES 5
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?

Member

## Re: Field in related tables

try this:

New Column =

DIVIDE(

GTI_POWERBI[TeimpoEfectivoSolucion],

SUM (BD_SLA[SLA_TORICO]),

0)

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)```

Proud to be a Datanaut!

Highlighted
Frequent Visitor

## Re: Field in related tables

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

Thank you.

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.