Forum Discussion
Add Custom column based on string in another column (if device = "iPhone" or "iPad" then do this)?
- 7 years ago
astrbac If you just looking for the new column "Correct Total Sales" logic, then please add "Custom Column" in Power Query as below:
if List.Contains({"iPhone","iPad","iPod"},[Platform]) then ([MobileSales]/2) + [WebSales] else [MobileSales] + [WebSales]
astrbac If you just looking for the new column "Correct Total Sales" logic, then please add "Custom Column" in Power Query as below:
if List.Contains({"iPhone","iPad","iPod"},[Platform]) then ([MobileSales]/2) + [WebSales] else [MobileSales] + [WebSales]PattemManohar Greg_Deckler LivioLanzo
Pattem, this worked! :) Now, I don't know whose solution I should accept, since all of you helped out but I didn't explain well in the beginning what I needed.
Any advice here?
- PattemManohar7 years agoCommunity Champion
astrbac Great !! It's totally upto you to accept the solution (It is for just quick reference for others to look into the solution directly instead of going-through entire chain). Also, there might be multiple solutions provided for the same scenario... So you can also accept multiple solutions as well... At the end of the day it's all about learning and sharing.....