Forum Discussion
Measure check
- 7 years ago
hi, vjnvinod
For your requirement, you could use IN Function in your formula,
and "Pursuit Team" coloumn has more than 1 names in it, you need to use SEARCH Function in it.
BDE check = IF ( 'Sales and Pipeline Full Data Ex'[Global Business Development Executive] IN { "Valencia, Gonzalo", "Webster, Julianne", "DiBlasio, Wendy", "Maliepaard, Yolanda", "Geyer, Jody", "Croft, Ben", "Gardner, Toby" }, "yes bde", IF ( 'Sales and Pipeline Full Data Ex'[Pursuit Leader] IN { "Valencia, Gonzalo", "Webster, Julianne", "DiBlasio, Wendy", "Maliepaard, Yolanda", "Geyer, Jody", "Croft, Ben", "Gardner, Toby" }, "yes pl", IF ( 'Sales and Pipeline Full Data Ex'[Identified By] IN { "Valencia, Gonzalo", "Webster, Julianne", "DiBlasio, Wendy", "Maliepaard, Yolanda", "Geyer, Jody", "Croft, Ben", "Gardner, Toby" }, "Yes-Identified By", IF ( SEARCH ( "Valencia, Gonzalo", 'Sales and Pipeline Full Data Ex'[Pursuit Team], 1, 0 ) > 0 || SEARCH ( "Webster, Julianne", 'Sales and Pipeline Full Data Ex'[Pursuit Team], 1, 0 ) > 0 || SEARCH ( "DiBlasio, Wendy", 'Sales and Pipeline Full Data Ex'[Pursuit Team], 1, 0 ) > 0 || SEARCH ( "Maliepaard, Yolanda", 'Sales and Pipeline Full Data Ex'[Pursuit Team], 1, 0 ) > 0 || SEARCH ( "Geyer, Jody", 'Sales and Pipeline Full Data Ex'[Pursuit Team], 1, 0 ) > 0 || SEARCH ( "Croft, Ben", 'Sales and Pipeline Full Data Ex'[Pursuit Team], 1, 0 ) > 0 || SEARCH ( "Gardner, Toby", 'Sales and Pipeline Full Data Ex'[Pursuit Team], 1, 0 ) > 0, "Yes-PT", "No" ) ) ) )By the way, you could use this tool to format your dax formula.
https://www.daxformatter.com/#
Note: Please understand that this tool is provided “AS IS” with no warranties or guarantees , and confers no rights.
Best Regards,
Lin
Hi, you can start to reduce using IN
Example:
IF (Table1[NameColumn] IN {"Angela", "Betty", "Karl"} , "TOP", Continue
Regards
Victor
thanks, super helpful
my new measure is below
BDE check = IF('Sales and Pipeline Full Data Ex'[Global Business Development Executive] IN {"Valencia, Gonzalo","Webster, Julianne","DiBlasio, Wendy","Maliepaard, Yolanda","Geyer, Jody","Croft, Ben","Gardner, Toby"},"yes bde",IF('Sales and Pipeline Full Data Ex'[Pursuit Leader] IN {"Valencia, Gonzalo","Webster, Julianne","DiBlasio, Wendy","Maliepaard, Yolanda","Geyer, Jody","Croft, Ben","Gardner, Toby"},"yes pl",IF('Sales and Pipeline Full Data Ex'[Identified By] IN {"Valencia, Gonzalo","Webster, Julianne","DiBlasio, Wendy","Maliepaard, Yolanda","Geyer, Jody","Croft, Ben","Gardner, Toby"},"Yes-Identified By",IF('Sales and Pipeline Full Data Ex'[Pursuit Team] IN {"Valencia, Gonzalo","Webster, Julianne","DiBlasio, Wendy","Maliepaard, Yolanda","Geyer, Jody","Croft, Ben","Gardner, Toby"},"Yes-PT"))))
there is one more issue here
i see above measure is not reading my "Pursuit Team" coloumn
below is my pursuit team coloumn, possibly because i have more thn 1 names in the field,
is there a way we can sort this?