Forum Discussion
Anonymous
3 years agoNot applicable
DAX For Categorising Observations
Hi, I have observations that need to be categorised into their rating groups, being "Positive", "Neutral", "Negative" and "Unknown" based on some of the descriptions within the variable. I n...
- 3 years ago
Hi Anonymous
If you are creating a measure then tryObservation Category Rating = VAR ObservationCategories = SELECTEDVALUE ( 'HSE Observation'[CategoryTypeName] ) RETURN SWITCH ( ObservationCategories, "Innovation", "Positive", "Exceeding Company Standards", "Positive", "Company Standard", "Netural", "Unknown", "Unknown", "Negative" )If you are creating a calculated column then try
Observation Category Rating = VAR ObservationCategories = 'HSE Observation'[CategoryTypeName] RETURN SWITCH ( ObservationCategories, "Innovation", "Positive", "Exceeding Company Standards", "Positive", "Company Standard", "Netural", "Unknown", "Unknown", "Negative" )
tamerj1
Community Champion
3 years agoHi Anonymous
If you are creating a measure then try
Observation Category Rating =
VAR ObservationCategories =
SELECTEDVALUE ( 'HSE Observation'[CategoryTypeName] )
RETURN
SWITCH (
ObservationCategories,
"Innovation", "Positive",
"Exceeding Company Standards", "Positive",
"Company Standard", "Netural",
"Unknown", "Unknown",
"Negative"
)
If you are creating a calculated column then try
Observation Category Rating =
VAR ObservationCategories =
'HSE Observation'[CategoryTypeName]
RETURN
SWITCH (
ObservationCategories,
"Innovation", "Positive",
"Exceeding Company Standards", "Positive",
"Company Standard", "Netural",
"Unknown", "Unknown",
"Negative"
)