Forum Discussion
PremierPBI
2 years agoRegular Visitor
Search & return values within the same table
Hi All I have a very simple table listing rebate IDs & rebate term percentages Some rebate IDs are stand alone, but some IDs have 'Parent Group IDs' I want to add a new column that looks at 'P...
- 2 years ago
In your query RABATE_GROUPS
- select last step
- create new step via circled button
- place there code below
- replace #"Changed Type" with your previous step reference.
= Table.AddColumn(#"Changed Type", "Custom", each if [PARENT_REBATE_GROUP_ID] = 0 then [REBATE_TERMS_PERCENTAGE] else #"Changed Type"{[ID = [PARENT_REBATE_GROUP_ID]]}[REBATE_TERMS_PERCENTAGE], type number)
PremierPBI
2 years agoRegular Visitor
I have, sorry this is my first post.
Maybe this is a step up for my Power Bi level. I need layman's terms 🙂
- dufoq32 years agoCommunity Champion
In your query RABATE_GROUPS
- select last step
- create new step via circled button
- place there code below
- replace #"Changed Type" with your previous step reference.
= Table.AddColumn(#"Changed Type", "Custom", each if [PARENT_REBATE_GROUP_ID] = 0 then [REBATE_TERMS_PERCENTAGE] else #"Changed Type"{[ID = [PARENT_REBATE_GROUP_ID]]}[REBATE_TERMS_PERCENTAGE], type number)- PremierPBI2 years agoRegular Visitor
dufoq3, thank you so much for your help and patience, I have it working now.🙏
- dufoq32 years agoCommunity Champion
You're welcome. Just one note: you should replace both #"Changed Type" in my query, not only the first one.