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)
-
PwerQueryKees
1 year agoSuper User
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"})