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
Hello. I have what I thought was going to be pretty simple. Wherever CUSTOMER_ID = "VER999", I would like the PARENT_ID to be "COOP":
| PARENT_ID | CUSTOMER_ID |
| EXE111 | |
| COOP | JHY789 |
| VER999 | |
| COOP | SYS654 |
| QWD321 | |
| VER999 | |
| LKJ871 | |
| COOP | FSG557 |
| VER999 |
My strategy was a new Custom Column where I use the following:
= Table.AddColumn(#"Cleaned Text1", "PARENT_ID_NEW", each if [Customer_ID] = "VER999" then [Parent_ID] = "COOP" else [Parent_ID])
Unfortunately, what I discovered is I am getting several "FALSE" values in the [PARENT_ID_NEW] column along with "COOP"; so it is putting in "COOP" for some of the "VER999" but not others? Strange! I've trimmed and cleaned so I don't understand what is causing it?
Solved! Go to Solution.
Hi @rmcgrath,
Your custom logic is almost correct. However that needs to be corrected to get expected results. You can use below code.
= Table.AddColumn(#"Cleaned Text1", "PARENT_ID_NEW", each if [Customer_ID] = "VER999" then "COOP" else [PARENT_ID])
Thanks,
If you found this solution helpful, please consider giving it a Like👍 and marking it as Accepted Solution✔. This helps improve visibility for others who may be encountering/facing same questions/issues.
Hi @rmcgrath,
Your custom logic is almost correct. However that needs to be corrected to get expected results. You can use below code.
= Table.AddColumn(#"Cleaned Text1", "PARENT_ID_NEW", each if [Customer_ID] = "VER999" then "COOP" else [PARENT_ID])
Thanks,
If you found this solution helpful, please consider giving it a Like👍 and marking it as Accepted Solution✔. This helps improve visibility for others who may be encountering/facing same questions/issues.
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 40 | |
| 37 | |
| 33 | |
| 29 | |
| 27 |
| User | Count |
|---|---|
| 133 | |
| 104 | |
| 61 | |
| 59 | |
| 55 |