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
Nestor_Moreno
Frequent Visitor

Calculate weight for category and KPI

Hi, 

 

I have 4 main category with respective weight that sum 100%, like in the image. 

 

Perspectiva.PNG

 

I need calculate the weight of each KPI, for example if the Perspectiva "Comunidad" have 2 KPI the weight of each KPI is 0.15, then i need multiply this value by column "Desempeño".

 

Actually i have this table.

 

Peso.PNG

I need calculate the column "Peso Total", in this case have 2 KPI then 0.30/2 = 0.15  but my formula is 0.30 this is wrong

 

additional the KPI quantity change depending of filter of Perspectiva Column.

 

I hope I was clear with this. 

 

Thank you so much your help. 

 

Regards.

5 REPLIES 5
Anonymous
Not applicable

Column=

 

Var a=Calculate(Count(Table[Perspectiva_Nival]),Allexcept(Table,table[Perso_Comunidad]))

Return

Divide(table[Perso_Comunidad],a)

 

Thanks

Pravin

Hi @Anonymous 

 

Thanks for your answer,

 

I send you the excel where is the calculation that i need reply.  Finally i need obtain:

Excel Calculation 

 

Porcentaje.PNG

Always i send you the .pbix file that you understand better my problem. 

Power BI File 

 

I appreciate any help you can give me.

Thank you so much. 

 

Regards.

Anonymous
Not applicable

As i can see in your excel you are just diving two columns.

New column=divide(table[col1],table[col2])

Go to modelling tab and click on firmst and select percentage.

Thanks
Pravin

If it resolves your problem mark it as a solution and give Kudos.
az38
Community Champion
Community Champion

Hi @Nestor_Moreno 

it is unclear without full data model but maybe it will be enough to use a column like 

 

Peso Total = 
DIVIDE(
[Peso_Comunidad],
CALCULATE(COUNTROWS('Table'), ALLEXCEPT('Table', 'Table'[Perspectiva_Nivel])
)

 


do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn

Hi @az38,

 

Thanks for your answer, I'm sorry if I wasn't clear enough.

 

I send you the excel where is the calculatio that i need reply.  Finally i need obtain:

Excel Calculation 

 

Porcentaje.PNG

Always i send you the .pbix file that you understand better my problem. 

Power BI File 

 

I appreciate any help you can give me.

Thank you so much. 

 

Regards.

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.

Top Solution Authors