Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
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:
Solved! Go to Solution.
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.
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.
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.00 | 80.00 |
| 2214.00 | |
| 1613.00 | |
| 371.00 | 60.00 |
| 382.00 | |
| 0.00 | 15.00 |
| 120.00 | |
| 400.00 | 15.00 |
| 104.00 | 40.00 |
@mabelsabogal So what are the results that you would expect from that sample?
Thank you for your reply!
The weight is not a categorical variable, but numerical. Thus, the quick measure "by category" would not work.
@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.
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 40 | |
| 37 | |
| 33 | |
| 29 | |
| 27 |
| User | Count |
|---|---|
| 133 | |
| 104 | |
| 61 | |
| 59 | |
| 55 |