Forum Discussion
chrismoncrief
1 year agoFrequent Visitor
IF-Then using columns
I am trying to create a query that would return values from a column based upon the label from another column. In the column for Allocation Pallets I am looking that any line that shows all...
- 1 year ago
Try this in the formula bar and replace #"Changed Type" with the name of the previous step.
= Table.ReplaceValue(#"Changed Type", each if [Inventory Status] = "Allocation" then [Allocation Pallets] else false, each [Pallets],Replacer.ReplaceValue,{"Allocation Pallets"}) - 1 year ago
To create the Allocation Pallets column in Power Query:
-
Add Conditional Column: Go to Add Column > Conditional Column.
- Set:
- Column Name: Allocation Pallets.
- Condition: Inventory Status = "Allocation".
- Output: Pallets.
- Else: 0.
- Set:
-
Formula Alternative: Use this formula if editing directly: = Table.AddColumn(Source, "Allocation Pallets", each if [Inventory Status] = "Allocation" then [Pallets] else 0)
-
Anonymous
1 year agoNot applicable
Hi chrismoncrief ,
Thank you for the helpful answer rohit1991 and PwerQueryKees .
I just wanted to kindly follow up to see if you had a chance to review the previous response provided by community members. Please let us know if it was helpful. If yes, please Accept the answer so that it will be helpful to others to find it quickly.