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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Hopeful question

Hi all

 

Hoping you might have a definitive answer for this one.

 

My client has asked if it is possible to use text to determine what visuals are shown in the report. I am aware of the 'Text Filter' visual and how it can filter out specific data in various visuals, however in this instance it would be to determine what visuals are on display in the report itself.

 

For example in my report if I had 4 separate cards with the following:

  1.  Orange Sales - 50
  2. Apple sales - 80
  3. Orange price - £0.45
  4.  Apple price - £0.30

Is it possible to manipulate the 'Text Filter' visual in such a way that if my user typed in 'Orange' (for example), that either a bookmark, or other solution, triggers to show only cards 1 and 3 in this instance, whilst hiding cards 2 and 4.

 

A hopeful one, but interested to see any responses.

 

Thanks all.

1 ACCEPTED SOLUTION

Hi @Anonymous ,

I updated my sample pbix file, you can get it from this link. The updated information as below:

1. Add a Text Filter visual

2. Create a measure as below and create two mask cards used this measure

Message = 
   IF(
      ISFILTERED('Fruits'[Fruit]),
      "",
      "You must input any value in text filter to see the results"
   )

3. Create a measure to display or hidden the cards and format the background color of mask cards with this measure

Make Transparent = 
      IF(
         ISFILTERED('Fruits'[Fruit]),
         "#FFFFFF00",
         "White"
      )

Best Regards

Rena

Community Support Team _ Rena
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

9 REPLIES 9
CNENFRNL
Community Champion
Community Champion

Hi, @Anonymous , I think here's a solution to your issue, pls refer to this old post,

https://community.powerbi.com/t5/Desktop/Bookmark-on-slicer-selection/td-p/307164


Thanks to the great efforts by MS engineers to simplify syntax of DAX! Most beginners are SUCCESSFULLY MISLED to think that they could easily master DAX; but it turns out that the intricacy of the most frequently used RANKX() is still way beyond their comprehension!

DAX is simple, but NOT EASY!

Anonymous
Not applicable

Hi @CNENFRNL 

 

Thansk for taking the time to respond. Indeed, that thread came up when I was searching for answers to this particular problem.

 

That thread talks about data in tables, whereas my query revolves around the visibility of the card visual.

 

Appreciate you responding though 🙂

Anonymous
Not applicable

Does anyone else have any ideas on this subject?

Hi @Anonymous ,

I created a sample pbix file for you, please check whether that is what you want.

Best Regards

Rena

Community Support Team _ Rena
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

Hi @v-yiruan-msft 

 

I'm not sure I understand, but thank you so much for your reply.

 

Unless I'm missing something, the PBIX has a slicer which splits between apple and orange, however I couldn't see a mechanism whereby an entry in a text filter visual has the power to show or hide visuals.

 

As an example...my desired outcome would be this...

 

featleyd_0-1600762412349.png

I've added the text filter visual to the report you supplied, and hidden the rest of the visuals.

 

featleyd_1-1600762538805.png

When the user types in say, Apple into the text filter and hits search or return, then some pre-made, but hidden card visuals appear in the report, and hide again when the search box is cleared.

 

I realise thats a huge ask, but what are your thoughts?

 

 

Hi @Anonymous ,

I updated my sample pbix file, you can get it from this link. The updated information as below:

1. Add a Text Filter visual

2. Create a measure as below and create two mask cards used this measure

Message = 
   IF(
      ISFILTERED('Fruits'[Fruit]),
      "",
      "You must input any value in text filter to see the results"
   )

3. Create a measure to display or hidden the cards and format the background color of mask cards with this measure

Make Transparent = 
      IF(
         ISFILTERED('Fruits'[Fruit]),
         "#FFFFFF00",
         "White"
      )

Best Regards

Rena

Community Support Team _ Rena
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

Hi @v-yiruan-msft 

 

As a follow-up to this. Is it possible to manipulate the measure to show if a particular value is entered in.

 

For example, if someone entered 'Apple' into the text filter it would show the data, but if they entered 'Orange' it wouldn't?

 

Any ideas?

 

Kindest regards

Hi @Anonymous ,

You can create a measure as below:

Measure 2 =
IF (
    HASONEVALUE ( 'Fruits'[Fruit] )
        && VALUES ( 'Fruits'[Fruit] ) = "Apple",
    [Measure],
    ""
)

Best Regards

Rena

Community Support Team _ Rena
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

Hi @v-yiruan-msft 

 

This is a really beautiful solution to the problem.

 

Thank you so much for taking the time to respond to me, and for the information provided. It truly is appreciated.

 

Kudos given, and very very much deserved.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

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.