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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
Tring01
Helper I
Helper I

Text filter need to restrict the wild card search drill through to the exact match input from field

Hi All,

Step-1

I have a requirement like on one screen I have implemented the Text custom filter here user trying to serch some thing and exact data is matching then I need to populate a pop up that matched else not matched. how can I achieve this through DAX.

 

Step-2

 

The same filter i have used in another page by using the sync slicer functionality, if that record is matched the same will drill through the next page and showing the same matching record with respective to the selected item from the first seen. 

 

Note: That exact match should shown not the matched data.

 

Expected scenario

Trying to search "Velo" from page one give me that exact match records on drill through page

Tring01_2-1718647528645.png

 

 

Not Expected

 

Trying to search from "V" it should not give the matched records like below screenshot, if not matching any value then need to  show the custom message like "no data available in red colour"

Tring01_3-1718647646053.png

 

 

 

 

Could some one please help me in this scenario. that really help me a lot if someone solves this.

 

Thanks in advance.

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Tring01 

 

Here's my test, I hope it can help you.

 

Sample:

vxuxinyimsft_0-1718678425711.png

 

1. Create a slicer table

 

product slicer = VALUES('Table'[Product])

 

 

vxuxinyimsft_1-1718678727840.png

 

2. Create a measure

 

Measure =
IF (
    SELECTEDVALUE ( 'product slicer'[Product] ) = BLANK (),
    0,
    IF (
        CONTAINSSTRINGEXACT (
            SELECTEDVALUE ( 'product slicer'[Product] ),
            MAX ( [Product] )
        ),
        1,
        0
    )
)

 

 

3. Put the measure into the visual-level filters, set up show items when the value is 1.

vxuxinyimsft_2-1718678916975.png

 

Output:

vxuxinyimsft_5-1718680264153.png

 

vxuxinyimsft_6-1718680284584.png

 

 

4. "When there is no value matching for what you want, a pop-up window is displayed". I'm afraid it can't be achieved directly, the following method is for your reference:

 

Create a measure as follows:

Measure 2 = 
VAR _count = CALCULATE(COUNT('Table'[Product]), FILTER('Table', [Measure] = 1))
RETURN
IF(_count <> 0 || _count <> BLANK(), BLANK(), "no data available in red colour")

 

Final Output:

vxuxinyimsft_7-1718680334624.png

 

vxuxinyimsft_8-1718680353576.png

 

Best Regards,
Yulia Xu

 

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

7 REPLIES 7
Tring01
Helper I
Helper I

Thanks For your Reply. Its working fine as expected. Thank you so much

I just modified the measure2  below 

Measure 2 =
VAR _count = CALCULATE(COUNT('Table'[Product]), FILTER('Table', [Measure] = 1))
RETURN
IF(_count <> 0 || _count <> BLANK(), "Data Found Click on View Data", "No Records Found")
 
Note: Is there any chance to apply the colour coding "Data Found Click on View Data" (This is in Green Colour) and "No Records Found" (This is in Red colour) If you can solve this. That really a great help for me.
 
Thank You so much once again.

 

Anonymous
Not applicable

Hi @Tring01 

 

Here's my test, I hope it can help you.

 

Sample:

vxuxinyimsft_0-1718678425711.png

 

1. Create a slicer table

 

product slicer = VALUES('Table'[Product])

 

 

vxuxinyimsft_1-1718678727840.png

 

2. Create a measure

 

Measure =
IF (
    SELECTEDVALUE ( 'product slicer'[Product] ) = BLANK (),
    0,
    IF (
        CONTAINSSTRINGEXACT (
            SELECTEDVALUE ( 'product slicer'[Product] ),
            MAX ( [Product] )
        ),
        1,
        0
    )
)

 

 

3. Put the measure into the visual-level filters, set up show items when the value is 1.

vxuxinyimsft_2-1718678916975.png

 

Output:

vxuxinyimsft_5-1718680264153.png

 

vxuxinyimsft_6-1718680284584.png

 

 

4. "When there is no value matching for what you want, a pop-up window is displayed". I'm afraid it can't be achieved directly, the following method is for your reference:

 

Create a measure as follows:

Measure 2 = 
VAR _count = CALCULATE(COUNT('Table'[Product]), FILTER('Table', [Measure] = 1))
RETURN
IF(_count <> 0 || _count <> BLANK(), BLANK(), "no data available in red colour")

 

Final Output:

vxuxinyimsft_7-1718680334624.png

 

vxuxinyimsft_8-1718680353576.png

 

Best Regards,
Yulia Xu

 

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

I just recreated this, but it's not working as shown in this post. If I try VE both VTT and Velo results come back. 

Thanks for your response it almostworking fine untill we dont have any similar records in the data. For example you can add Velo1 value in the product column and check the same scenario. it is not working for the similar record I tried from my end. so  can you please alter the code and send me the upadted one if possible. Thank you so much in advance for your prompt response.

Hi, 

In the above scenario is working fine but we have another requirement like if the value is matching we provide some custom message like " Data is available" this custom message in (green in colour), if not  matching the record, then it will showing another message like "No data available " this is in Red in colour) after modifying your measure 2 query like below 

Measure 2 =
VAR _count = CALCULATE(COUNT('Table'[Product]), FILTER('Table', [Measure] = 1))
RETURN
IF(_count <> 0 || _count <> BLANK(), "No data available", "Data is available")

 

Note : I used this measure 2 in some text box in my report. but here is one problem, if user not entering any value in the text filter the message will not go away. That will misleading to the user like he is not entering any data its showing the message that is incorrect. is there any way to restrict that in our dax formula. 

If user not entering any value in the text filter that text box should show empty, if they enterns any value that qrecord is matcing then show right message else show the " No data available " mesaage that is in red colour.

 

Could you please look into my concern and do the needful.

 

Thank you so much in advance for your kind help.

 

Hi 

It will show only for the exact match. Below is the test case with I tried "Ve" that means not exact match in this scenario also data should not appear. below is the screenshot for reference.

 

Tring01_0-1718691992019.png

 

 

Hi, Is there any scenario to achieve this if exact match give some message like "Data matched" if not match "Not matched" else should populate as null. I need this requirement business is strictly need this one please check whether it is possible. Thank you for your kind help

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

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