Forum Discussion
How to link between two charts?
- 1 year ago
It was fixed by adding a relationship between the tables with the MES column.
Thank you!
Best regards.
Thank you for reaching out to the Microsoft Fabric community.
We have implemented a combination of DAX measures and a relationship between the tables within the dataset. The logic enables comparison of Gastos vs Facturación by MES and calculates the percentage contribution of each No Facturable category relative to total monthly Gastos.
While the exact structure of your dataset is not fully known, a sample dataset and I’ve created a sample .pbix file to demonstrate one possible solution by creating a measure:
-----Measure-----
Porcentaje_NoFacturable =
DIVIDE(
SUM('NoFacturables'[Valor]),
[GastosTotales_Mensuales],
0
)
---- Another Measure-------
GastosTotales_Mensuales =
SUM('Gastos'[Suma de Fate]) +
SUM('Gastos'[Suma de Aluar]) +
SUM('Gastos'[Deriv. madryn])
Please refer to the attached .pbix file for a working example and review the implementation.
I hope this information proves helpful. If not, please feel free to share additional details, and we’ll be happy to
assist you further.
Regards,
Karpurapu D,
Microsoft Fabric Community Support Team.
Hello! How is it going?. I tried but unfortunately the calculation of the percentage is not good. It seems to me that he does not calculate the percentage month by month. I don't see your attachment.
April Training: 5,187,710
Total turnover April: 78,951,173
Training percentage: 6.75% and in the graph with the formulas you passed me, it gives me 1.61%
I attach the program: https://drive.google.com/file/d/1ovgSYpK6n6N6PHkV-5JuQZZpcOi6TXEy/view?usp=sharing
- v-karpurapud1 year agoCommunity Support
Hi Syndicate_Admin
Thank you for your response and for providing the details. It seems that there is a possible discrepancy in the percentage calculation and are prepared to review it further. We are unable to translate the file you sent. Could you please provide a translated version? This will allow us to better understand the data structure and support you more effectively.
Thank You.- Syndicate_Admin1 year agoAdministrator
Nice day. The file is in Spanish. What language do you want to translate it into?
There I separated the four graphics more clearly on a single screen:
1) Total billing graph (correct values: the sum of all the months gives $486,250,492)
2) Percentage of training that gives error.
3) Training Chart
4) Total billing per month (there you can see the error that the total shown is 323,081,275, that's why you miscalculate the percentage).
How could I correct it?I attach the link to the file
https://drive.google.com/file/d/1VL8NpMeIeB-fx2JTxaUATOlyriNFroZE/view?usp=sharing
- v-karpurapud1 year agoCommunity Support
Hi ,
The problem occurs because the total monthly Gastos used in the percentage calculation is incorrect it shows only a partial sum instead of the full monthly billing (Facturación). This causes the calculated percentages (such as for Training in April) to be much lower than they should be. Ensure that the [GastosTotales_Mensuales] measure accurately calculates the total Gastos for each month, not a sum over the entire dataset or an incorrectly filtered value. You can achieve this by applying the ALLEXCEPT() or KEEPFILTERS() function in the measure to maintain the month context.GastosTotales_Mensuales = CALCULATE( SUM('Gastos'[Valor]), ALLEXCEPT('Gastos', 'Gastos'[Mes]))With this, the percentage measure will correctly reflect the month-by-month values:
Porcentaje_NoFacturable = DIVIDE( SUM('NoFacturables'[Valor]), [GastosTotales_Mensuales], 0 )Also, please translate the file into English to help us better understand the fields and logic and provide more accurate response.
Regards,
Karpurapu D.