Forum Discussion
multiple condition with search/filter condition
Hi,
Can anyone help me with the below?
I'm trying to add a column with the below condition.
If column [Type of Request] = "Account Details"
Then
Search column [Type] for word BPID create or Account or BPID setup
If yes, return the Account ID
else, Search column [Type] for word contract, Agreement, MDA
...
Else If column [Type of Request] = "Business"
and so on
| Type of Request | Request Details | Code word | Code word | Code word |
| Account Details | Account ID | BPID create | Account | BPID Setup |
| Account Details | Contracts | contract | Agreement | MDA |
- Anonymous2 years ago
Hi venyamu ,
I have processed the data you provided using power query, please check if the following results are as you expected:
Measure = var _T = SELECTEDVALUE('Table'[Type of Request]) RETURN SWITCH(TRUE(),_T="Account Details" &&MAX('Table'[Type]) IN{"BPID create","Account","BPID setup"},"Account ID", _T="Account Details" &&MAX('Table'[Type]) IN{"contract","Agreement","MDA"},"Contracts")An attachment for your reference. Hope it helps!
Best regards,
Community Support Team_ Scott ChangIf this post helps then please consider Accept it as the solution to help the other members find it more quickly.
1 Reply
- AnonymousNot applicable
Hi venyamu ,
I have processed the data you provided using power query, please check if the following results are as you expected:
Measure = var _T = SELECTEDVALUE('Table'[Type of Request]) RETURN SWITCH(TRUE(),_T="Account Details" &&MAX('Table'[Type]) IN{"BPID create","Account","BPID setup"},"Account ID", _T="Account Details" &&MAX('Table'[Type]) IN{"contract","Agreement","MDA"},"Contracts")An attachment for your reference. Hope it helps!
Best regards,
Community Support Team_ Scott ChangIf this post helps then please consider Accept it as the solution to help the other members find it more quickly.