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!Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Afternoon guys,
I was hoping to create a visual which will display for example "Food + Drink". So when someone orders fritters and a flat white, it shows up in my Food and Drink Column and from that I can create a column which says "Food + Drink".
I've thought of going into this a few ways (Concantrate but its limited to two text strings), An IF function, but I can't see to get it to "If Food = Kitchen and Drinks = Drinks" write Food + Drink.
A custom column might be the best option but I'm not sure about the code (Useful link: http://community.powerbi.com/t5/Desktop/If-text-column-CONTAINS-specified-value-give-me-what-I-want/...)
Thoughts?
I'd like to be to do it so each of them had a catagory. So if someone just ordered food, it would just say food. I'm going to make it more granular later (like Coffee + Breakfast), but it's the same principles.
Edit: Maybe merging queries somehow? http://community.powerbi.com/t5/Desktop/HOW-Calculated-Column-if-quot-this-column-quot-matches-quot-...
Edit2: Custom Colum with:
if ([Food] = Kitchen or [Drink] = Drink) then "Food + Drink"
^Doesn't like the code and I'm not sure why; might be missing a if else component?
Solved! Go to Solution.
To cater for the various combinations, how about something like:
Food + Drink = IF ( ISBLANK ( Table1[Food] ) , IF ( ISBLANK ( Table1[Drink] ), BLANK (), "Drink" ), IF ( ISBLANK ( Table1[Drink] ) , "Food", "Food + Drink" ) )
But I'm not able to use COUNT upon the measure [Food+Drink] as well it's a measure. Anyone have an idea how to count the number of text values as a resultant from a measure?
I feel like this will work as a Custom Column, can anybody correct the code? It's asking for a parenthesis after the first left parenthesis.
if ( ISBLANK ( [Section2a] = "Food" ),
if ( ISBLANK ( [Section2a] = "Drink ),
BLANK (),
"Drink" ),
if ( ISBLANK ( [Section2a] = "Drink ) ,
"Food",
"Food + Drink" )
)
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!