Forum Discussion

NeoChau's avatar
NeoChau
Frequent Visitor
1 year ago
Solved

Highlighting a cell Dynamically

Another highlight problem I got. Thanks in advance for answering my question.

Table A (Case)

Case No.Case title
01-24Assault
02-24Arson
03-24Arson
04-24Fraud

Table B (Tag Library)

Tag_IDDescription
0001Cafe
0002Park
0003Apartment
0004Train Station

 

Table C (Case & Tag)

Case No.Tag_ID
01-240001
01-240002
02-240001
02-240003
03-240001

 

All tables are joined together with the related key.

In my report:

There is a title search visual, a table visual "A" showing all filtered cases (From Table A) and a table visual "B" showing all tag tagged with the filtered cases.

 

After the user inputs the criteria for the title search, say "Arson".

Visual "A" will be like this

02-24 Arson

03-24 Arson

Visual "B" will be like this

0001 Cafe

0003 Apartment

 

If the user selects/clicks on 0001, I want to highlight the 02-24 and 03-24.

If the user selects/clicks on 0003, I want to highlight only 02-24 (because 03-24 doesn't have the tag 0003).

 

How to do this? I've been struggling with this for two days...

 

 

  • Hi NeoChau,
    Thanks for your patience.

    I’ve reproduced your scenario in Power BI and was able to achieve the expected outcome based on your requirement:

    • When a user selects a Tag (e.g., Cafe), the related Case No entries are visually highlighted in the Case table without filtering out the others.

    This is done using a DAX measure with conditional formatting, as recommended earlier. The interaction from the Tag visual to the Case visual remains disabled to preserve the full list of cases, while relevant rows are highlighted dynamically.

    For your reference, I’m attaching the working .pbix file.

    I trust this addresses your needs. If it does, please “Accept as solution” and give it a "kudos"  to help others find it easily.
    Thank you.

  • v-ssriganesh's avatar
    v-ssriganesh
    1 year ago

    Hi NeoChau,
    I hope this information is helpful. Please let me know if you have any further questions or if you'd like to discuss this further. If this answers your question, please accept it as a solution and give it a 'Kudos' so other community members with similar problems can find a solution faster.
    Thank you.

12 Replies

  • It should filter automatically if you select the row in B. Screenshots would be helpful.

    • NeoChau's avatar
      NeoChau
      Frequent Visitor

      Please please please. Could anyone help?

       

      • LED_General's avatar
        LED_General
        Advocate I

        I think you could try to make the relationships bidirectional (which is normally discouraged, but in your case it could check if it works).

  • NeoChau's avatar
    NeoChau
    Frequent Visitor

    LED_GeneralI dont want the case table be filtered after user selected the tag. I disabled the interaction from the tag visual to case visual. I just want the case table to be highlighted based on user selection on tag visual

  • v-ssriganesh's avatar
    v-ssriganesh
    Community Support

    Hi NeoChau,
    Thank you for reaching out to the Microsoft Fabric Community Forum.

    Power BI natively highlights using visual interactions, where selecting a value in one visual filters or highlights related data in other visuals. However, since you’ve disabled the interaction from the Tag visual to the Case visual to prevent filtering, you can’t use the default highlighting behavior. This is expected, as disabling interactions stops the filter context from propagating to the Case visual.

    To achieve your goal, you can use a DAX measure combined with conditional formatting to dynamically highlight rows in the Case table based on the selected tag, without filtering the table. This is the most effective and scalable solution for your scenario.


    If you find this information useful, please “Accept as solution” and give it a "kudos" to assist others in locating it easily.
    Thank you.

    • NeoChau's avatar
      NeoChau
      Frequent Visitor

      Thanks for your explanation.

      How to do it exactly?

      • v-ssriganesh's avatar
        v-ssriganesh
        Community Support

        Hi NeoChau,

        To achieve the highlighting effect without filtering the Case table, you can create a custom DAX measure that checks if the selected tag is associated with each case. This measure won't filter the data but will act as a flag to indicate which cases are related to the selected tag. With this logic in place, each row in the Case visual can be evaluated to determine whether it should be highlighted when a tag is selected, even though the visual interactions are turned off.

        Once the measure is created, you can use conditional formatting in the Case table visual. Select the field you want to highlight (like Case No or Case Title), then apply conditional formatting using the measure as the basis for formatting rules. Set different background or font colors depending on whether the case is linked to the selected tag. This way, the Case visual retains all rows but visually highlights only the relevant ones.

        I trust this information proves useful. If it does, kindly “Accept as solution” and give it a "kudos" to help others locate it easily.
        Thank you.