Forum Discussion
nolos
2 years agoNew Member
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...
- Anonymous2 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
Ashish_Mathur
Super User
2 years agoHi,
Shouldn't the answer be 2? This calculated column formula work?
P = calculate(max(data[points]),filter(data1,data[Points low]<=earlier(data[value])&&data[Points high]>=earlier(data[value])))
Hope this helps.