Forum Discussion

renanpinheiro's avatar
renanpinheiro
Advocate II
9 years ago
Solved

Calcular nota

I have the following situation: I have a table where each user appears 19 times.   Each time it receives a note (0 or 1) for the answer presented on the line.   I created a measure in which I ...
  • v-sihou-msft's avatar
    v-sihou-msft
    9 years ago

    renanpinheiro

     

    In this scenario, I suggest you create a score measure to calculate the answer rate for each student, then create a summarized table with stundent column and score column only. After that you can create measures to count the stundents for different bucket. Please refer to my sample below:

     

     

     

     Create a summarized table with student and score column only.

     

    Table = ADDCOLUMNS(
    SUMMARIZECOLUMNS(Table1[Student]),
    "Score",
    CALCULATE(SUM(Table1[Answer]),ALLEXCEPT(Table1,Table1[Student]))/CALCULATE(COUNTROWS(Table1),ALLEXCEPT(Table1,Table1[Student]))
    )

     

     

    Then you can create two measures and populate them into card visual:

     

    Above 75% = CALCULATE(COUNTA('Table'[Student]),FILTER('Table','Table'[Score]>=0.75)) 

     

    Below 75% = CALCULATE(COUNTA('Table'[Student]),FILTER('Table','Table'[Score]<0.75)) 

     

     

    Regards,