Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
Hello Everyone,
I would like to add a category column based on an existing text column in my table. I have the text column as shown below, and I have provided the desired result that I aim to achieve:
Text Column:
Title |
Books and notebooks logistic order#12646484 is in Exception State and its ETA is 10 Days |
Mismatch in Production and load delivery |
ordered item is not matching with origiinal order |
I have found few mismatch in the ordered plant and received plant |
Desired Result:
Title | Category |
Books and notebooks logistic order#12646484 is in Exception State and its ETA is 10 Days | Books and Notebooks Order Issue |
Mismatch in Production and load delivery | Mismatch in production & Load |
ordered item is not matching with origiinal order | Order Mismatch |
I have found few mismatch in the ordered plant and received plant | Plant micmatch Issue |
Please help me with the Dax query to achive this result if possible any hlep in this regard is much appreciated
Thanks and Regards
@member @Anonymous
Solved! Go to Solution.
Hi @Premlatapandey9 ,
You can create a calculated column.
Category =
SWITCH (
TRUE (),
CONTAINSSTRING ( TableName[Title], "Books and notebooks" ), "Books and Notebooks Order Issue",
CONTAINSSTRING ( TableName[Title], "Mismatch in Production" ), "Mismatch in production & Load",
CONTAINSSTRING ( TableName[Title], "ordered item" ), "Order Mismatch",
CONTAINSSTRING ( TableName[Title], "mismatch in the ordered plant" ), "Plant mismatch Issue",
"Other"
)
Best Regards,
Neeko Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Premlatapandey9 ,
You can create a calculated column.
Category =
SWITCH (
TRUE (),
CONTAINSSTRING ( TableName[Title], "Books and notebooks" ), "Books and Notebooks Order Issue",
CONTAINSSTRING ( TableName[Title], "Mismatch in Production" ), "Mismatch in production & Load",
CONTAINSSTRING ( TableName[Title], "ordered item" ), "Order Mismatch",
CONTAINSSTRING ( TableName[Title], "mismatch in the ordered plant" ), "Plant mismatch Issue",
"Other"
)
Best Regards,
Neeko Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hello @Anonymous This is amazing I am incredibly grateful for your time and expertise. Your willingness to help is awesom, and I wanted to express my sincere appreciation. Kudos to you for your outstanding efforts!
What if your text matches multiple categories? Do you have a preferred matching order?
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
16 | |
13 | |
12 | |
11 | |
11 |
User | Count |
---|---|
19 | |
14 | |
14 | |
11 | |
9 |