Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
jibran
Helper II
Helper II

Custom column filter with user values

Hi,

I am struggling to write a simple dax where I want to create a calculated column on the basis of database column

like I have a table 

ID      Product                Calculated Column

1        Iphone 3              iphone

2        Iphone 4              iphone

3        Samsung s6         android

4        Samsung s5         android

 

I want to create dax query in calculated column whereever there is iphone3, iphone4 calculated column shows iphone and where there is samsung s6 and samsung s5 it shows android

 

Many Thanks 

 

Jibran Ishtiaq

1 ACCEPTED SOLUTION
v-haibl-msft
Microsoft Employee
Microsoft Employee

@jibran

 

Please try with following DAX expression.

 

Calculated Column = 
IF (
    SEARCH ( "Iphone", Table1[Product],, 0 ) > 0,
    "iphone",
    IF ( SEARCH ( "Samsung", Table1[Product],, 0 ) > 0, "android" )
)

Custom column filter with user values_1.jpg

 

Best Regards,

Herbert

View solution in original post

1 REPLY 1
v-haibl-msft
Microsoft Employee
Microsoft Employee

@jibran

 

Please try with following DAX expression.

 

Calculated Column = 
IF (
    SEARCH ( "Iphone", Table1[Product],, 0 ) > 0,
    "iphone",
    IF ( SEARCH ( "Samsung", Table1[Product],, 0 ) > 0, "android" )
)

Custom column filter with user values_1.jpg

 

Best Regards,

Herbert

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Top Solution Authors