Forum Discussion

nolos's avatar
nolos
New Member
2 years ago
Solved

assign points based on what range a values falls under

I have a table with ranges in it.  Depending on what range that the value I have falls under, I want to assign it a point value.  Can you help with the DAX? So if I have a value of 2.75 I want...
  • Anonymous's avatar
    Anonymous
    2 years ago

    Hi nolos ,

     

    Should the result be 2? If yes, how do you want to display it?

     

    The creation of calculated column  Ashish_Mathur mentioned is a great way to do this, and you can also try measure.

     

    Here's how to get a result by creating a measure.

     

    Measure 4 = CALCULATE(MAX('Table (2)'[Points]),FILTER('Table (2)','Table (2)'[Points High]>=SELECTEDVALUE('Table (3)'[Value])&&'Table (2)'[Points Low]<=SELECTEDVALUE('Table (3)'[Value])))

     

     

    My Table(2).

     

    My Table(3).

     

    I add a Slicer with Value column of Table(3) and a card with Measure4. When I select 2.75, the card shows 2.

     

     

    Best regards,

    Mengmeng Li