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
Anonymous
Not applicable

Case weighting in BI

Hello, 

 

I have been running into a bit of a wall lately, and seems others are two, when using survey data in powerBI. My problem is that I need to weight my data by case (respondent). I have a variable in my table which is the weight each respondent carries (their sum adds up to the total number of responsdents). I need to use this to up or down weight each respondent when I plot questions so our data matches targets (such as nat rep samples). I realise this isnt very straightforward in BI and most of my responses are not numerical (ie. are yes, no, male, female etc.). 

 

Does anyone have any suggestions for the best way to go about weighting my variables in BI? Currently I am trying to follow the solution in https://community.powerbi.com/t5/Desktop/case-weighting-in-data/td-p/51599, but having very little luck getting it to work on a simple column chart showing percentages of those male and female. Using this DAX code:

 

GenderWeightedMeasure = SUMX('Demographics and Single Punch Questions', 'Demographics and Single Punch Questions'[Weight.Weight] * 'Demographics and Single Punch Questions'[DUM_GENDER_ALT]) / SUM('Demographics and Single Punch Questions'[Weight.Weight])

 

This is something thats very common in market research and very easy to implement in other packages such as SPSS and Q, so seems strange theres no option to weight by case here. 

 

Any help or advice would be very much appreciated!

1 ACCEPTED SOLUTION
v-chuncz-msft
Community Support
Community Support

@Anonymous ,

 

You may check if the following post helps.

https://community.powerbi.com/t5/Desktop/If-with-Filter/m-p/549475#M258454

Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
v-chuncz-msft
Community Support
Community Support

@Anonymous ,

 

You may check if the following post helps.

https://community.powerbi.com/t5/Desktop/If-with-Filter/m-p/549475#M258454

Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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.