The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
Hi
I have GDP data per country, and would like to calculate the weight each country within a Geographic Group has, and then multiply the wieghts to corresponding scores per country, ultimately get a weighted average score per Geographic Group. How do I calculate the weights in a table (table view)? I thought about using
Thanks!
Solved! Go to Solution.
Hi @wsspglobal ,
You may create column or measure like DAX below to get weighted rate.
Measure: Weighted rate= DIVIDE(SUM(Table1[GDP]),CALCULATE(SUM(Table1[GDP]),ALL(Table1))) Column: Weighted rate= DIVIDE(CALCULATE(COUNT(Table1[GDP]),FILTER(ALLSELECTED(Table1),Table1[Country]=EARLIER(Table1[Country])&&Table1[Geographic Group]=EARLIER(Table1[Geographic Group]))),SUM(Table1[GDP]))
Best Regards,
Amy
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @wsspglobal ,
Does that make sense? If so, kindly mark my answer as a solution to help others having the similar issue and close the case. If not, let me know and I'll try to help you further.
Best regards
Amy
Hi @wsspglobal ,
You may create column or measure like DAX below to get weighted rate.
Measure: Weighted rate= DIVIDE(SUM(Table1[GDP]),CALCULATE(SUM(Table1[GDP]),ALL(Table1))) Column: Weighted rate= DIVIDE(CALCULATE(COUNT(Table1[GDP]),FILTER(ALLSELECTED(Table1),Table1[Country]=EARLIER(Table1[Country])&&Table1[Geographic Group]=EARLIER(Table1[Geographic Group]))),SUM(Table1[GDP]))
Best Regards,
Amy
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
User | Count |
---|---|
80 | |
78 | |
37 | |
34 | |
31 |
User | Count |
---|---|
93 | |
81 | |
60 | |
49 | |
49 |