Forum Discussion
weighted average
Hi,
I have this sample dataset:
I need to calculate a weighed average in power bi:
Media pesata is a calculated column:
Hi, Giada_Togliatti
Please try something similar to the below.
I tried to create a sample pbix file similar to yours.
Dedia pestata total fix =IF (ISFILTERED ( 'Table'[Category] ),[Media pestata],SUMX ( VALUES ( 'Table'[Category] ), [Media pestata] )* SUMX ( VALUES ( 'Table'[Category] ), [Peso Avg] ))Or, please share your sample pbix file's link here.The link below is my sample pbix file's link.Hi, My name is Jihwan Kim.
If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up.
Linkedin: linkedin.com/in/jihwankim1975/
Twitter: twitter.com/Jihwan_JHKIM
4 Replies
- Jihwan_KimSuper User
Hi, Giada_Togliatti
Please try something similar to the below.
I tried to create a sample pbix file similar to yours.
Dedia pestata total fix =IF (ISFILTERED ( 'Table'[Category] ),[Media pestata],SUMX ( VALUES ( 'Table'[Category] ), [Media pestata] )* SUMX ( VALUES ( 'Table'[Category] ), [Peso Avg] ))Or, please share your sample pbix file's link here.The link below is my sample pbix file's link.Hi, My name is Jihwan Kim.
If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up.
Linkedin: linkedin.com/in/jihwankim1975/
Twitter: twitter.com/Jihwan_JHKIM
- Giada_TogliattiPost Patron
perfect, thank you!
- amitchandakSuper User
Giada_Togliatti , Try a measure like
divide(sum(Table[Foglio1[Punteggio]), sum(table[media pesata]))
- Giada_TogliattiPost Patron