Forum Discussion
DAX IF formula
- Anonymous9 years ago
DHB I'm not aware of how to get around the first requirement, I'd just add the additional "IF". the second one searching for "media" in the value should be resolved using the added syntax I have below:
Column =
IF('assignment_dim'[submission_types] = "discussion_topic","Discussion",
IF(assignment_dim[submission_types]= "online_upload", "Plain Assignment",
IF(assignment_dim[submission_types]= "external_tool", "External Tool",
IF(assignment_dim[submission_types]= "not_graded", "Ungraded",
IF(assignment_dim[submission_types]= "online_quiz", "Quiz",
IF(assignment_dim[submission_types]= "none", "Plain Assignment",
IF((SEARCH("*media*", assignment_dim[submission_types],1,0)>0)= TRUE, "Media Content","Other"
)))))))
DHB This should work
Column = IF([submission_types] = "discussion topic","Discussion", IF([submission_types]= "Online Upload" , "Plain Assignment", "Other"))
edit: with table names (was testing some things out and stripped them.
Column = IF('assignment_dim'[submission_types] = "discussion topic","Discussion", IF(assignment_dim[submission_types]= "Online Upload" , "Plain Assignment", "Other"))
- DHB9 years agoHelper V
Thank you for your quick response. I'm getting this message now...
A single value for column 'submission_types' in table 'assignment_dim' cannot be determined. This can happen when a measure formula refers to a column that contains many values without specifying an aggregation such as min, max, count, or sum to get a single result.
The submission types column has text values. Could this be the issue here?