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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
BEC_100
Frequent 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
Frequent 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!


LinkedIn


Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.