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
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
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.