Forum Discussion

Hamilton's avatar
Hamilton
New Member
8 years ago

How to weight survey data

Hi all.

 

I am relatively new to using power BI, and am trying to apply weights to survey data.

 

The way the data is structured I have weights aligned with the corresponding userID's (my key)

What is the best way to apply this weight for each and every question I am visualising, and how is it done?

I have found the following resource for Tableau which looks like what I want: http://www.datarevelations.com/working-with-weighted-survey-data.html 

 

How would I go about applying that in Power BI? I assume its converting this statement: 

 SUM([Weight]) / TOTAL(SUM([Weight]))

to PowerBi equivalent and adding it as a measure / in every visualisation?



Thanks

1 Reply

  • v-juanli-msft's avatar
    v-juanli-msft
    Icon for Community Support rankCommunity Support
    To describe this statement “ SUM([Weight]) / TOTAL(SUM([Weight]))” in Power BI
    Using the measure below instead:
    MEASURE1 =
    DIVIDE (

        SUM ( Table1[Weight] ),

        CALCULATE ( SUM ( Table1[Weight] ), ALL ( Table1 ) )

    )
    As you said,“What is the best way to apply this weight for each and every question I am visualising, and how is it done?”
    Please show some example data with us and ask specific questions so that we are able to figure out each solution to each question.
     
    Best Regards
    Maggie