Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
All,
I am attempting to add an if function to a column to calculate quantity of a row based on part description. I have tried search and contains functions to no success. Anytime the part name contains partial I would like to multiply by one. since all other parts are whole, would like to multiply by 4. Any feedback will be appreciated.
| Part Name | Qty | Total |
| a, partial | 1 | ='Qty'*1 |
| a, whole | .5 | ='Qty'*4 |
| b, partial | 1 | ='Qty'*1 |
| b, whole | .75 | ='Qty'*4 |
Solved! Go to Solution.
Calculated column measure :
Measure=SWITCH(TRUE(),FIND("partial",[Part Name],1,0)>=1,[Qty]*1,[Qty]*4)
Thank you for the prompt feedback, that calculation multiplies all qty by 1, even when partial is in the part name. Any other thoughts.
Thanks that worked, not sure why it did nto work. Must of entered something incorrectly
Hi @leroy773 ,
Try this column on Power Query:
if Text.Contains([Part Name], "partial") then 1 else 4 * [Qty]
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.