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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
aalfa
Frequent Visitor

Create grouping based on a keyword

Hi there,

 

Can I create custom groups based on a keyword in a particular field?

 

For example, here are a few entries in my field:

 

- $10 cash drop

- 6/19 interest expense

- 6/20 interest expense

- 8/19 DISC 

- $15 cash drop

- 4/23 DISC

- Discovery

 

I want to group all entries that contain the keyword "DISC" but potentially exclude "Discovery."

 

Thank you,

Alex

2 ACCEPTED SOLUTIONS
vanessafvg
Super User
Super User

maybe something like this could work?

 

@aalfa

 

group=
SWITCH (
    TRUE (),
    AND ( SEARCH ( "Disc", Fieldname ) = 1, SEARCH ( "Discovery", Fieldname ) = 0 ), "Disc",
    "NA"
)





If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




View solution in original post

v-yulgu-msft
Microsoft Employee
Microsoft Employee

Hi @aalfa,

 

You could refer to below formula to create a calculated column:

 

Grouping = IF(FIND("DISC",'Create grouping'[Column1],1,0)>0,"DISC","N/A")

 

As FIND function is case sensitive, it will distinguish "DISC" and "Disc", the record containing "Discovery" will be excluded in result.

 

Regards,
Yuliana Gu 

Community Support Team _ Yuliana Gu
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

2 REPLIES 2
v-yulgu-msft
Microsoft Employee
Microsoft Employee

Hi @aalfa,

 

You could refer to below formula to create a calculated column:

 

Grouping = IF(FIND("DISC",'Create grouping'[Column1],1,0)>0,"DISC","N/A")

 

As FIND function is case sensitive, it will distinguish "DISC" and "Disc", the record containing "Discovery" will be excluded in result.

 

Regards,
Yuliana Gu 

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
vanessafvg
Super User
Super User

maybe something like this could work?

 

@aalfa

 

group=
SWITCH (
    TRUE (),
    AND ( SEARCH ( "Disc", Fieldname ) = 1, SEARCH ( "Discovery", Fieldname ) = 0 ), "Disc",
    "NA"
)





If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.