Forum Discussion

Syndicate_Admin's avatar
Syndicate_Admin
Administrator
1 year ago
Solved

How to link between two charts?

Good afternoon

I have the following graph that I would like to take the data of the total sums of each month (data that is put together automatically but I do not calculate it): (data that says 167 million, 128 million, 112 million, and 79 million).

With that data, I would like to have it in some form, as if to get the percentage in the other graph:

I want each item (training, meetings, not charged, suspended, internal activities, rework) to be expressed as a percentage of the total values.

Training x 100% / maximum value of the corresponding month = %Percentage of training in that month.

I wouldn't want to have to calculate everything by hand. for each month.. It's a lot.. There should be an easy way. That is why I come to you, to see if you have any idea how to do it.

Thank you!.

Best regards.

  • It was fixed by adding a relationship between the tables with the MES column.

    Thank you!

    Best regards.

18 Replies

  • Royel's avatar
    Royel
    Super User

    Hi Syndicate_Admin you want the percentage to be based on whatever is currently selected in your report, try this measure 

    Dynamic Category Percentage = 
    DIVIDE(
        SUM(YourTable[CategoryValue]),
        CALCULATE(
            SUM(YourTable[CategoryValue]),
            ALLSELECTED(YourTable[Category])
        )
    ) * 100

    I hope this method will work. Let me know your progress. For this case, Its better if you create some sample data like 5-10 records and show case the table relationship and the explain what you want to achieve then its very easy for others to understand and solve the problem.


     
    Find this helpful? ✔ Give a Kudo • Mark as Solution – help others too!

    • Syndicate_Admin's avatar
      Syndicate_Admin
      Administrator

      Hello! No, I would like the percentage of each one (training, meetings, not charged, suspended, internal activities, rework) with respect to the total amount of billing in the same month.

      April Training: 5,187,710

      Total turnover April: 78,951,173

      Training percentage: 6.75%

  • Hi,

    From the second image i observed that you have dragged may items to the column labels.  Ideally that should not be the case.  Share some data to work with and show the expected result in a simple table format.  Once we get that correct, we can build any viz.

  • v-karpurapud's avatar
    v-karpurapud
    Community Support

    Hi Syndicate_Admin 


    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.


    • Syndicate_Admin's avatar
      Syndicate_Admin
      Administrator

      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-karpurapud's avatar
        v-karpurapud
        Community 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.