Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hope you have a good day,
I need to create a new column based on existing column but to combine some cell values with text datatype into a different text value.
fo example, i have a column name Category having 1000 cells showing different text values, i want to create new column but need to change the text of cells "ABC" and "DEF" into one text value like "XYZ".
Thanks in Advance
Solved! Go to Solution.
Hi,
I tried to create a sample pbix file like below, and please check whether it suits your dataset.
I hope the below can provide some ideas on how to create a solution for your dataset.
Please check the below picture and the attached pbix file.
New column CC =
SWITCH (
TRUE (),
CONTAINSSTRING ( Data[Category], "ABC" ), SUBSTITUTE ( Data[Category], "ABC", "XYZ" ),
CONTAINSSTRING ( Data[Category], "DEF" ), SUBSTITUTE ( Data[Category], "DEF", "XYZ" ),
Data[Category]
)
Hi,
I tried to create a sample pbix file like below, and please check whether it suits your dataset.
I hope the below can provide some ideas on how to create a solution for your dataset.
Please check the below picture and the attached pbix file.
New column CC =
SWITCH (
TRUE (),
CONTAINSSTRING ( Data[Category], "ABC" ), SUBSTITUTE ( Data[Category], "ABC", "XYZ" ),
CONTAINSSTRING ( Data[Category], "DEF" ), SUBSTITUTE ( Data[Category], "DEF", "XYZ" ),
Data[Category]
)
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
Check out the November 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 66 | |
| 44 | |
| 40 | |
| 29 | |
| 19 |
| User | Count |
|---|---|
| 200 | |
| 126 | |
| 103 | |
| 70 | |
| 53 |