Forum Discussion
cottrera
Post Prodigy
5 years agoDAX scoring if column values between set criteria
Hi I have a property table of about 1.5 million rows. Each row has a risk score based wehter a dangerios material (Asbestos) has been located or not. The table contains the following columns - Prop...
- 5 years ago
Hi Richard,
You might try this:Risk Category = var risk_score=[Risk Score] return SWITCH(TRUE(), [NETOF2]=0,"No Asbestos", AND(risk_score>=1,risk_score<=8),"Low", AND(risk_score>=9,risk_score<=15),"Medium", AND(risk_score>=16,risk_score<=24),"High")
Hope it will be helpful.
Regards,
Marc
cottrera
Post Prodigy
5 years agoHi Marc thank you for your quick reponse. I am asuming that the variable is a measure. I dont have a measure for the Risk Score. This result is on the source table at a row by row level.
Also I am asuming the [NETOF2] should be risk_score
thanks
Richard
Anonymous
5 years agoNot applicable
Hi Richard,
You are right at the second point, [NETOF2] should be risk_score, that was a mistake.
[Risk Score] is not a measure, it is calling the value of the column Risk Score, so it will work.
Regards,
Marc