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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

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

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
July 2024 Power BI Update

Power BI Monthly Update - July 2024

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

PBI_Carousel_NL_June

Fabric Community Update - June 2024

Get the latest Fabric updates from Build 2024, key Skills Challenge voucher deadlines, top blogs, forum posts, and product ideas.

Top Solution Authors