Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
mabelsabogal
Frequent Visitor

Weighted average

Hello,

 

I need to weight a variable by another in Power BI. I have tried several formulae that I have found online to no avail. The results are incorrect when I compare them with the SPSS output that I got previously. What could be the problem?

 

One of the variables I need to weight is: 

Percentage of your new full-time entry-level college hires typically come from interviews initially conducted on-campus
 
And it needs to be weighted by: 
Total number of new college graduate hires at organization
 
Could you please help?
 
Thank you!
 
 
1 ACCEPTED SOLUTION
mabelsabogal
Frequent Visitor

I found a solution for this problem: SPSS will automatically not include cases where there isn't data for either the value or the weight you are using but powerbi doesn't do that. You have to go in and manually remove any of those data points in the dataset so that the values return what you get in SPSS. 

View solution in original post

6 REPLIES 6
mabelsabogal
Frequent Visitor

I found a solution for this problem: SPSS will automatically not include cases where there isn't data for either the value or the weight you are using but powerbi doesn't do that. You have to go in and manually remove any of those data points in the dataset so that the values return what you get in SPSS. 

mabelsabogal
Frequent Visitor

@Greg_Deckler 

 

Here is the SPSS Output for that sample:

 
N Valid 1117
Missing 4329
Mean 46.36
 
mabelsabogal
Frequent Visitor

@Greg_Deckler 

Here is a small sample of the data:

Total number of new college graduate hires at your organization (or unit)Percentage of your new full-time entry-level college hires typically come from interviews initially conducted on-campus
242.0080.00
2214.00 
1613.00 
371.0060.00
382.00 
0.0015.00
120.00 
400.0015.00
104.0040.00

@mabelsabogal So what are the results that you would expect from that sample?



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...
mabelsabogal
Frequent Visitor

@Greg_Deckler 

Thank you for your reply!

The weight is not a categorical variable, but numerical. Thus, the quick measure "by category" would not work.

Greg_Deckler
Community Champion
Community Champion

@mabelsabogal See if this helps: 

 

Otherwise, Sorry, having trouble following, can you post sample data as text and expected output?
Not really enough information to go on, please first check if your issue is a common issue listed here: https://community.powerbi.com/t5/Community-Blog/Before-You-Post-Read-This/ba-p/1116882

Also, please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490

The most important parts are:
1. Sample data as text, use the table tool in the editing bar
2. Expected output from sample data
3. Explanation in words of how to get from 1. to 2.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.