Forum Discussion
astrbac
7 years agoFrequent Visitor
Add Custom column based on string in another column (if device = "iPhone" or "iPad" then do this)?
Hi all! I am just getting started with Power Query and "Get and transform" in general but have some previous understanding of more advanced Excel features (such as pivot tables, VBA and such). Th...
- 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
7 years agoFrequent Visitor
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?
PattemManohar
7 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.....