Forum Discussion

niranjanm45's avatar
niranjanm45
Frequent Visitor
2 years ago

Weighting survey data

Hi,

 

I am working with survey data where there are numerous questions answered(numeric) by respondents. I also have weight given in the file for each respondent. How can I apply that weight to weigh up or down the response ? I know this can be done in Q or SPSS, but not sure how to do it in power BI. Some inputs are binary while few are ordinal. Data looks like this:

 

 

 

2 Replies

  • Hi niranjanm45 
    If I understood you in the right way, you can use sumx function, something like
    Weighted measure = sumx(your table,[score column]*[nweight])

    if it is something else, 

    please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).
    https://community.powerbi.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-...
    Please show the expected outcome based on the sample data you provided.

    https://community.powerbi.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523

    If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly.

     
    • niranjanm45's avatar
      niranjanm45
      Frequent Visitor

      Hi Ritaf1983 ,

       

      Thanks for your response. The data has binary inputs (Yes, 1 and No,0) and in some cases, ordinal inputs (1-5). The weight column has been calculated using the age group gender and state. So, just multplying the weight column would not be the correct way I feel. Attaching the data for reference:

      QS1AStateRegionalQS2QS2r99QS2AxQS3QS3nweight
      6412703111.36145
      9525706221.2848
      12716807110.566402
      12713403110.8833
      14813403220.792434
      9522402221.115278
      7425606220.708307
      2213904221.217883
      14816907220.669167
      2214905111.444613
      12716406111.347893
      12715806111.347893
      12713203220.610411
      8512703220.7227
      6414905221.067625