Forum Discussion
Anonymous
6 years agoNot applicable
get column based on multiple if conditions
Hello All, Iam working on migration project and have requirment like this: In a table, i want to display different columns based on different conditions in single dax....
v-eachen-msft
Community Support
6 years agoHi Anonymous ,
You could try the following DAX:
Column =
VAR a =
COUNT ( 'Table'[Direct] )
VAR b =
COUNT ( 'Table'[VP_Director] )
VAR c =
COUNT ( 'Table'[Director_Manager] )
VAR d =
COUNT ( 'Table'[Manager] )
RETURN
IF (
d > 0,
"SUBAREA_OWNER",
IF (
c > 0,
"Manager",
IF ( b > 0, "Director_Manager", IF ( a > 0, "VP_Director" ) )
)
)
Anonymous
6 years agoNot applicable
v-eachen-msft Thanks for the help. but this solution doesn't work for requirment