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

Next up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now

Reply
Gaurav_84
Helper I
Helper I

Filter column

Hi All,

 

Need you expert advice i want to create 2 columns within table using filter function. Below is how my data look.

Column A include both home & design types & column B can be used for filter. Now i want that based on column B i can put all home types under home & Design types under design column.

 

Gaurav_84_1-1649131930206.png

 

Regards

 

4 REPLIES 4
amitchandak
Super User
Super User

@Gaurav_84 , new columns 

Column B  = Switch( True() ,

search("Home",[ColumnA],,0) > 0 , "Home ",

search("Design",[ColumnA],,0) > 0 , "Design", Blank() )

 

Home = if([Column b] ="Home", "Home", blank())

 

Design= if([Column b] ="Design", "Home", blank())

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Hi Amit, Thanks for your response, i believe i have given the incorrect example. Right example should be like below one.

Gaurav_84_0-1649134241855.png

 

@Gaurav_84 , I think First switch has to change

example

Column B = Switch( True() ,

[Column A] in {"Value1", "Value2", "ABC",

//add others

search("Design",[ColumnA],,0) > 0 , "Design", Blank() )

 

 

If this does not help
Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Thanks Amit, I got bit confused can you please explain the query you have written with below data example. 

Gaurav_84_0-1649135563939.png

 

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

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.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.