Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
venyamu
New Member

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 RequestRequest DetailsCode wordCode wordCode word
Account DetailsAccount IDBPID createAccountBPID Setup
Account DetailsContractscontractAgreementMDA
1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @venyamu ,

 

I have processed the data you provided using power query, please check if the following results are as you expected:

vtianyichmsft_0-1713923818606.png

 

 

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 Chang

 

If this post helps then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
Anonymous
Not applicable

Hi @venyamu ,

 

I have processed the data you provided using power query, please check if the following results are as you expected:

vtianyichmsft_0-1713923818606.png

 

 

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 Chang

 

If this post helps then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors