cancel
Showing results for 
Search instead for 
Did you mean: 

Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.

Reply
BEC_100
Regular Visitor

Filter Items

Sorry for the basic question.  I am trying to learn the measure flow. I have a table that contains several items

PCB

PS

CABLES

COVER

LEDs

The following measure helps to identify the items

 

IF (CONTAINS(Installers,Installers[Product Name],"PCB"),"these are the pcb found","not pcb")

 

However, it displays all other “not pcb” items.  How do I display only the PCB items.

1 ACCEPTED SOLUTION
v-yueyunzh-msft
Community Support
Community Support

Hi , @BEC_100 

According to your description, you just want to show the data contains "PCB".

Here are the steps you can refer to :

vyueyunzhmsft_0-1675128186172.png

(1)We can click "New Measure" to enter this:

Flag = var _name =  MAX('Table'[Name])
return
IF( CONTAINSSTRING(_name,"PCB") ,1,0)

(2)Then we can put the measure on the "Filter on this visual" and configure it and then we can meet your need:

vyueyunzhmsft_1-1675128317336.png

 

 

If this method does not meet your needs, you can provide us with your special sample data and the desired output sample data in the form of tables, so that we can better help you solve the problem.

Thank you for your time and sharing, and thank you for your support and understanding of PowerBI! 

 

Best Regards,

Aniya Zhang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

 

View solution in original post

4 REPLIES 4
v-yueyunzh-msft
Community Support
Community Support

Hi , @BEC_100 

According to your description, you just want to show the data contains "PCB".

Here are the steps you can refer to :

vyueyunzhmsft_0-1675128186172.png

(1)We can click "New Measure" to enter this:

Flag = var _name =  MAX('Table'[Name])
return
IF( CONTAINSSTRING(_name,"PCB") ,1,0)

(2)Then we can put the measure on the "Filter on this visual" and configure it and then we can meet your need:

vyueyunzhmsft_1-1675128317336.png

 

 

If this method does not meet your needs, you can provide us with your special sample data and the desired output sample data in the form of tables, so that we can better help you solve the problem.

Thank you for your time and sharing, and thank you for your support and understanding of PowerBI! 

 

Best Regards,

Aniya Zhang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

 

grantsamborn
Solution Sage
Solution Sage

Make the following change

Before:
IF (CONTAINS(Installers,Installers[Product Name],"PCB"),"these are the pcb found","not pcb")

After:
IF (CONTAINS(Installers,Installers[Product Name],"PCB"),"these are the pcb found")
BEC_100
Regular Visitor

yes, of course.

What I get with the measure is 

PCB375893These are the PCB found
PS465Not pcb
CABLES4567Not pcb
PCB45786These are the PCB found
LEDs8923Not pcb

 

I would like to display only PCB items

PCB375893These are the PCB found
PCB 45786These are the PCB found

 

many thanks

Arul
Super User
Super User

@BEC_100 ,

Could you explain it bit more in detail? Also, If possible please add the sample data.

Thanks,

Arul





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Helpful resources

Announcements
PBI November 2023 Update Carousel

Power BI Monthly Update - November 2023

Check out the November 2023 Power BI update to learn about new features.

Community News

Fabric Community News unified experience

Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.

Dashboard in a day with date

Exclusive opportunity for Women!

Join us for a free, hands-on Microsoft workshop led by women trainers for women where you will learn how to build a Dashboard in a Day!

Power BI Fabric Summit Carousel

The largest Power BI and Fabric virtual conference

130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors