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
jbolivar
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

I think this might need to be:

 

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

@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

View solution in original post

5 REPLIES 5
pawel1
Kudo Kingpin
Kudo Kingpin

try this:

 

New Column =

   DIVIDE(

      GTI_POWERBI[TeimpoEfectivoSolucion],

      SUM (BD_SLA[SLA_TORICO]),

      0)

 

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

Thank you.

I think this might need to be:

 

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

@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

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.

jthomson
Solution Sage
Solution Sage

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?

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.