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

View all the Fabric Data Days sessions on demand. View schedule

Reply
alfredomelo
Frequent Visitor

Trying to show two lines on chart from different tables that are relationed between them by date

Hi all,

Im pretty new on power bi tool, so i think my issue is quiet simple, let me explain out my scenario:

 

I have the next 2 tables:

 

Table 1 (MatrizDatosTotal)

Table 1.png

 

Table 2  (LimitesDivisionEmpresa)

Table 2.png

 

Now , relations are in the following wayRelations.png

I have the next measure inside my first table for sumarize:

 

Calculo Total 2 = IF(
HASONEFILTER(MatrizFinal[TipoOperacion]),
ROUND(SUM(MatrizFinal[Importe]) ,1),
ROUND((CALCULATE(SUM(MatrizFinal[Importe]),FILTER(MatrizFinal,[TipoOperacion]="DEUDA TOTAL")) - CALCULATE(SUM(MatrizFinal[Importe]),FILTER(MatrizFinal,[TipoOperacion]="Caja Total"))) ,1) + ROUND((CALCULATE(SUM(MatrizFinal[Importe]),FILTER(MatrizFinal,[TipoOperacion]="Factoraje")) + CALCULATE(SUM(MatrizFinal[Importe]),FILTER(MatrizFinal,[TipoOperacion]="Plazo Ampliado")) + CALCULATE(SUM(MatrizFinal[Importe]),FILTER(MatrizFinal,[TipoOperacion]="Venta de Cartera"))) ,1)
+ ROUND((CALCULATE(SUM(MatrizFinal[Importe]),FILTER(MatrizFinal,[TipoOperacion]="Comercializadora"))) ,1)
)

 


And Show the "Matrix" table with the next configuration:

Config Matrix.png

Matrix Table.png

 

Next, i used a new measure for the Chart in the same Table 1: 

 

Calculo Total = IF(
HASONEFILTER(MatrizDatosTotal[TipoOperacion]),
ROUND(SUM(MatrizDatosTotal[Importe]) ,1),
ROUND((CALCULATE(SUM(MatrizDatosTotal[Importe]),FILTER(MatrizDatosTotal,[TipoOperacion]="DEUDA TOTAL")) - CALCULATE(SUM(MatrizDatosTotal[Importe]),FILTER(MatrizDatosTotal,[TipoOperacion]="Caja Total")))  ,1) + ROUND((CALCULATE(SUM(MatrizDatosTotal[Importe]),FILTER(MatrizDatosTotal,[TipoOperacion]="Factoraje")) + CALCULATE(SUM(MatrizDatosTotal[Importe]),FILTER(MatrizDatosTotal,[TipoOperacion]="Plazo Ampliado")) + CALCULATE(SUM(MatrizDatosTotal[Importe]),FILTER(MatrizDatosTotal,[TipoOperacion]="Venta de Cartera"))) ,1)
+ ROUND((CALCULATE(SUM(MatrizDatosTotal[Importe]),FILTER(MatrizDatosTotal,[TipoOperacion]="Comercializadora"))) ,1)
)

 

The result of this new measure is contained into the next chart:

Chart.png

 

With the next configuration:

Config chart.png


At this point all good, but we need in the last chart display the limits for the Company's Division into the same chart above.

 

So the Table 2  (LimitesDivisionEmpresa) contains the limits for company's division and currency, and just need to display the Amount of that limit into lines like the following :

 

Chart with Limits.png


In some divisions have one limit, and for others have 2 or more. I can't achieve this,  and i dont know how to get this out ..  can you help me ?

 

Thanks in advance.

 

Regards.
Alfredo Melo

2 REPLIES 2
v-frfei-msft
Community Support
Community Support

Hi @alfredomelo ,

 

Does Constant Line in Analytics pane meet your reuqirement? BTW, I created a sample for your reference, Please refer to the attachment.

 

Capture.PNG

 

 

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.

Hi @v-frfei-msft,

 

The problem is that i have a Table (table 2) with variable limits for each company, so i need to show different limits depending which company its filtering.

 

Thank you for your response, I appreciate your help

 

Alfredo.

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors