Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more.
Get startedGrow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.
Hello All,
First time poster. Slowly learning the power of Power Bi 🙂
I would like to create a custom column that evaluates, say column A, if the value contains "NHP" then have the value equal "NHP". Else, do not change the value that is there already.
The table contains values such as NHP +4, NHP Chair, NHP Pole, Etc. All these can be summed up as "NHP"
I hope that is clear. I think I may be using poor terminology 😞
Thank-Erik
Solved! Go to Solution.
Something similar to this should work. It looks for NHP in Column A, no matter the case, and returns NHP if found, otherwise it returns the original value from ColA.
CustomCol = IF(CONTAINSSTRING(UPPER(ColA) "NHP"), "NHP", ColA)
Let me know if you have any problems with trying this out 🙂
Awesome.
Thank you.
I just needed to add a comma between ...(UPPER(ColA) and "NHP") then the formula worked.
Now, I'll see if I can next additional conditions 😉
Erik
@ErikCR ,
Open Power query editor and do the following,
1. Go to add column at the top and click conditional column,
2. Name your new column and then choose the highlighted placeholder values based on your data,
3. In the else placeholder choose the highlighted symbol which means select a column if the above mentioned condition is not matched,
Thanks,
Arul
This is great Arul.
I think it will also make added additional conditions easier.
Erik
Something similar to this should work. It looks for NHP in Column A, no matter the case, and returns NHP if found, otherwise it returns the original value from ColA.
CustomCol = IF(CONTAINSSTRING(UPPER(ColA) "NHP"), "NHP", ColA)
Let me know if you have any problems with trying this out 🙂
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Ask questions in Eventhouse and KQL, Eventstream, and Reflex.
User | Count |
---|---|
84 | |
83 | |
64 | |
61 | |
55 |
User | Count |
---|---|
171 | |
109 | |
109 | |
73 | |
71 |