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
ruggerogiordano
New Member

Calculating the weighted value

Hi, i'm a novice of power bi.

I need to make a report where after i have grouped a lot of employees by category, i have to calculate the weighted value of "Conteggio di MATRICOLA" (es. 582*0,30) in a new column. All this dynamically.

"QUALIFICA" and "PESO" are in a table.

 

Cattura.PNG

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Thanks a lot 🙂

Ruggero

2 REPLIES 2
sturlaws
Resident Rockstar
Resident Rockstar

Have you looked at the SUMX-function?

Spoiler
weighted value =
SUMX ( Table; table[Peso] * [Conteggio di MATRICOLA] )
lc_finance
Solution Sage
Solution Sage

Hi @ruggerogiordano ,

 

 

from your question, I am not sure whether 'Peso' and 'Conteggio di Matricola' are measures or columns.

 

If they are both measures, you can simply create a new measure with formula:

 

Conteggio weighted = [CONTEGGIO DI MATRICOLA] * [PESO]

 

If one or both them is a column, you'll need to decide how to 'aggregate' the column (which has multiple values) to one single value to include in your multiplication.

 

Below is a second example, if Conteggio di Matricola and Peso are both columns:

Weighted of Conteggio = SUM('Table'[CONTEGGIO DI MATRICOLA])*AVERAGE('Table'[PESO])

In this second example, the column Peso is aggregated by adding all of its values and the column Conteggio is aggregated by making an average of its values.

 

Hope this answers your question! Feel free to share more info if you need more help.

Interested in Power BI finance templates? Check out my blog at www.finance-bi.com

 

 

 

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.