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
Tring01
Frequent Visitor

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
v-xuxinyi-msft
Community Support
Community Support

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

3 REPLIES 3
Tring01
Frequent Visitor

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.

 

v-xuxinyi-msft
Community Support
Community Support

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.

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

 

 

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.

July Newsletter

Fabric Community Update - July 2024

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

Top Solution Authors