Forum Discussion

gill_thornton's avatar
3 years ago
Solved

Lookup with Measure

Hi

I work in a school and am creating some headline measures for my post-16 cohort.  All grades have point values attached to them, e.g; A* = 60; A = 50 etc.  I have a calculated overall measure for average point score.  I now need to show this as a grade based of DfE technical guidelines sample below:

 

APS Band MinAPS Band MaxGrade
58.3460A*
5558.33A*-
51.6754.99A+
48.3451.66A
4548.33A-
41.6744.99B+
38.3441.66B
3538.33B-
31.6734.99C+
28.3431.66C
2528.33C-
21.6724.99D+
18.3421.66D
1518.33D-
11.6714.99E+
8.3411.66E
58.33E-
04.99U

 For example I have an A level APS as a measure of 30.33 - I need to create a measure to show the equivalent grade.  How can I do this?

  • MFelix's avatar
    MFelix
    3 years ago

    Hi gill_thornton,

     

    I have made a simple model with only the grades table and a metric with a value input, no other tables or relationships.

     

    How are you calculating the metric? is there any relationship between the grades and the table from where you are calculating the metric?

5 Replies

  • Greg_Deckler's avatar
    Greg_Deckler
    Community Champion

    gill_thornton Not sure if I understand completely but maybe something like a SWITCH(TRUE(), ...) statement like:

    Measure =
      SWITCH(TRUE(),
        [Current Measure] > 45, "A",
        [Current Measure] > 35, "B",
        [Current Measure] > 25, "C",
        [Current Measure] > 15, "D",
        "F"
      )
    
  • Hi gill_thornton,

     

    Taking into account that you have the table above for your grade you need to do something similar to this:

    Grade Value =
    MINX (
        FILTER (
            'Grade Table',
            'Grade Table'[APS Band Min] <= [A level APS]
                && 'Grade Table'[APS Band Max] >= [A level APS]
        ),
        'Grade Table'[Grade]
    )

     

     

     

     

    • gill_thornton's avatar
      gill_thornton
      Helper I

      Thank you for this solution.  It looks as though it should work perfectly, but when I apply, it is returning a grade A, which is incorrect.  I'm not quite sure where I'm going wrong.

      • MFelix's avatar
        MFelix
        Super User

        Hi gill_thornton,

         

        I have made a simple model with only the grades table and a metric with a value input, no other tables or relationships.

         

        How are you calculating the metric? is there any relationship between the grades and the table from where you are calculating the metric?