Forum Discussion
Creating custom column if specific values from two other column are expected result
- Anonymous1 year ago
Hi Justas4478
Thank you rajendraongole1 for the great reply. If this has helped you solve your problem, please consider accepting rajendraongole1's reply as a solution.
Here are some of my suggestions that I hope will help you.
1. Write dynamic rules in the Power Query editor using the M language. Example:= Table.AddColumn( PreviousStep, "Description", each if [Storage] = "X" and [Destination] = "Y" then "Z" else if [Storage] = "A" and [Destination] = "B" then "C" else "Default Description" )
2. If the combinations are very large and may change dynamically, it is recommended to maintain an external mapping table (e.g. Excel or database) with storage, destination and corresponding description. Then import the mapping table into Power BI. Use the MERGE function to join the master table to the mapping table and find the description based on storage and destination.Best Regards,
Jarvis Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi Justas4478 - create a new calculated column as below