Forum Discussion

RichXM655's avatar
RichXM655
Helper I
6 years ago
Solved

Categories or metadata for Columns.

Hi. I've got an upcoming project where I will be feeding the results of a large survey (about 500 questions, 30k responses) into powerBI to make a report.   The client has defined some of the ques...
  • v-yuta-msft's avatar
    v-yuta-msft
    6 years ago

    RichXM655 ,

     

    In query editor, click on all the questions() and then click transform-> Unpivot Columns, you will get two new columns [Attribute] and [Value] as below:

     

     

    After applied&close, you need to build a one-many relationship between these two tables as below:

      

     

    Then you can create a measure to calculate the average value of Mentor in category A like pattern below:

    Average_Value_Of_Mentor = CALCULATE(AVERAGE(Table1[Value]), FILTER(Table2, Table2[Category A] = "Mentor"))

     

     

    You can also refer to the pbix attached.

     

    Community Support Team _ Jimmy Tao

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