Forum Discussion
Anonymous
6 years agoNot applicable
DAX Help With Nested If
Hello I hope a kind soul may be able to help me out. I am trying to convert the attached Cognos case statement into a DAX statement, in a caclulated column. I have been trying for a whole using a...
- 6 years ago
Something like this?
Switch ( true ( )
, [field1] = blank() && [field2] = blank() , "double oops"
, [field1] = blank() , "type-1 oops"
, [field2] = blank(), "type-2 oops"
, "Undefined"
)
Anonymous
6 years agoNot applicable
Or if you want to stay with if please see below. I didn't do exactly the same to yours but used all logical tests you need. Just replace it with your values.
Play with it as it works, just tested it.
fix = if(max(stores[Store name]) = "Aberfeldy", "Aberfeldy store",
if(max(stores[Store name]) = "Abergele", "store",
if(and(max(stores[Store name]) = "Abertillery",max(stores[Store number]) = 173),"warehouse",0)))
daniel