Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!
Hi All,
I am trying to add a new column to take a "product" and add a "Category", there can be up to 10 product names in each category.
I wanted to use IF ([Product]= "option 1" or "option 2" or "option 3" etc , "Category 1", IF ([Product]= "option 6" or "option 7" or "option 8 " etc, "Category 2", IF ([Product] = "option 14" or "option 16" or "option 20" or "option 12", "Category 3", "no category")))
However this doesn't work, I'm sure there is a better way to achieve what I'm looking for, your help is greatly appreciated.
Thanks
Steve
Solved! Go to Solution.
IF ( [Product] = "option 1" || [Product] = "option 2" || [Product] = "option 3" , "Category 1", IF ( [Product] = "option 6" || [Product] = "option 7" || [Product] = "option 8 " , "Category 2", IF ( [Product] = "option 14" || [Product] = "option 16" || [Product] = "option 20" || [Product] = "option 12", "Category 3", "no category")))
Could you show your raw data and your expected result?
This is what I see
Ok, in every OR you must use [Product]="VALUE". Try it please.
I still get an error, should I have additional parentheses?
Replace "or" with "||"
thats got it, thanks 🙂
This is right, &&= AND and ||=OR
Vote for your favorite vizzies from the Power BI World Championship submissions!
If you love stickers, then you will definitely want to check out our Community Sticker Challenge!
Check out the January 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 63 | |
| 51 | |
| 41 | |
| 23 | |
| 18 |
| User | Count |
|---|---|
| 130 | |
| 111 | |
| 48 | |
| 30 | |
| 28 |