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

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

Reply
scottm0690
Frequent Visitor

Using Slicer to find exact text in a field

I have a report that has 2 columns, one is a Number, the 2nd is a line of business.  I created a slicer table that has 4 line of business names, and i created a measure based on another post here in Powerbi to filter for that slicer line of business in the report table.  The issue i am having is that 2 of the names are close to the same accept 1 has an additional letter.  Example: SET and SETF, how can i filter just on what choose?  So if i choose SET, it won't find the SETF also.  

 

This is the measure command:

Measure =
VAR searchvalue =
SEARCH (
SELECTEDVALUE ('Table'[LOB] ),
SELECTEDVALUE ('Changes Opened - By LOB'[Impacted LOB] ),
,
BLANK ()
)
RETURN
IF ( searchvalue > 0, "1" )
 
Thanks
1 ACCEPTED SOLUTION
v-chenwuz-msft
Community Support
Community Support

Hi  @scottm0690 , 

You can just creata replationship between these two tables based on field [Impacted LOB] and [LOB].

vchenwuzmsft_0-1649063480247.png

 

Or add one condition befor this IF in your measure.

 

add =
IF (
    LEN ( SELECTEDVALUE ( 'Table'[LOB] ) ),
    LEN ( SELECTEDVALUE ( 'Changes Opened - By LOB'[Impacted LOB] ) ),
    [measure]
)

 

Best Regards
Community Support Team _ chenwu zhu

 

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

3 REPLIES 3
v-chenwuz-msft
Community Support
Community Support

Hi  @scottm0690 , 

You can just creata replationship between these two tables based on field [Impacted LOB] and [LOB].

vchenwuzmsft_0-1649063480247.png

 

Or add one condition befor this IF in your measure.

 

add =
IF (
    LEN ( SELECTEDVALUE ( 'Table'[LOB] ) ),
    LEN ( SELECTEDVALUE ( 'Changes Opened - By LOB'[Impacted LOB] ) ),
    [measure]
)

 

Best Regards
Community Support Team _ chenwu zhu

 

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

 

amitchandak
Super User
Super User

@scottm0690 ,
Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.

 

need to where is word lying so can  we have exact match or not

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

scottm0690_0-1648663687872.png

My slicer is a table i built

 

scottm0690_1-1648663727353.png

When i choose SET, it shows SET and SETF, i just want SET

Thanks, hope this helps.

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Feb2025 Sticker Challenge

Join our Community Sticker Challenge 2025

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!