Forum Discussion
replace multiple values list in the same table
Hello dobregon
you can use this formula in your new custom colum
if Text.Contains([Path], [Id]) = true then Text.Replace([Path], [Id], [Order]) else [Path]
Have fun
Jimmy
It this helps, consider marking this post as solution or like it
Hi Jimmy801 ,
Where does the three come from in the last row?
Nathaniel
- Jimmy8016 years agoCommunity Champion
Good question Nathaniel_C
i didn't even look at it.. simple implemented the request specified by dobregon .
Maybe table is wrong or we will get a new logic.. lets wait 😉
Have a nice time
Jimmy
- dobregon6 years agoImpactful Individual
Jimmy801 & Nathaniel_C thanks a lot for your replies and see the error in the last row ajaja now it is corrected the parent id is 5.
Related to your query Jimmy801 this function only substitute the values in that can find in the row, what i want is to do something like this in the same table (not creating 2-3 tables in the powerquery)
https://www.thebiccountant.com/2016/05/22/multiple-replacements-in-power-bi-and-power-query/
The path is the hierarchy based on the Id and ParentId, and what i want is to create another column based on the Path column and check every number in the path for the list of IDs that i have and susbitute taking the Order.
I have done something sumilar using this link example but only it is possible if i create 2 tables, the principal table and the other with only IDs and Order column. I'm looking if it is possible to create "virtual" buffer table with that info (IDs, Order) and then apply the recursive function- Jimmy8016 years agoCommunity Champion
Hello dobregon
this actually hasn't to do anything with your orignal request, to replace values. Here we are taking about another logic to show a hierarchy. order Path it's difficult to read, because it uses another logic by combing the first two column. You want to have it in a more grafical way. Something like a WBS structure of a project like this
1
1.1
1.1.2
1.2
2..
Got it?
How important is this to you? Because this may need some deeeeeep thinking.
If this post helps or solves your problem, please mark it as solution.
Kudos are nice to - thanks
Have fun
Jimmy