Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
8 years ago
Solved

How can I highlight values based on separate list

Hi,

I'd like to highlight certain values based on my customer's specific needs. Lets say I have a dataset with 100s of device names on a website and a count for each device that displays the number of clicks per device. My customer has a separate small list of "Important" devices (with the same name) that they are interested in. In my customization I would like to highlight any of those important devices that may appear in the list.

I would be happy to manully edit the customization but I believe conditional formatting does not work on Text fields.

I thought of having a separate data set listing the interesting devices (which I can manually create as it is small), then doing some lookup against the 2 tables and where there is a match for devicename I can create some flag in a new column in the bigger table.

I've tried linking the 2 tables and various DAX using LOOKUPVALUE but can't quite get there.

Any suggestions?

  • Hi Anonymous,

     

    You can create a measure like this as an indicator. You can try it out in this file.

    IsFavourite =
    IF (
        MIN ( SiteData[Device] ) IN VALUES ( 'FavouriteDevices'[Device] ),
        "Yes",
        "No"
    )

    How_can_I_highlight_values_based_on_separate_list2

     

    Best Regards,

    Dale

6 Replies

    • Anonymous's avatar
      Anonymous
      Not applicable
      SiteData.csv
      Device,Hits
      Device 1,100
      Device 2,125
      Device 3,88
      Device 4,199
      Device 5,300
      Device 6,247
      Device 7,236
      Device 8,52
      Device 9,8
      Device 10,111
      
      
      FavouriteDevices.csv
      Device 3
      Device 6
      Device 7

      Hi, it can be any simple list of devices with dummy data associated and a separate list of devices to reference - in this case by the same Device name. I've attached 2 csv examples which I assume can be used. The desired outcome would be a list of all the devices in SiteData.csv but with the devices in FavouriteDevices.csv highlighted somehow (in real life my SiteData might have 100s devices and FavouriteDevices would only have up to 10 devices, but they could change every few weeks).

      • v-jiascu-msft's avatar
        v-jiascu-msft
        Icon for Microsoft Employee rankMicrosoft Employee

        Hi Anonymous,

         

        This could be easy. We can import two files and establish a 1:* relationship. The result table could be like below.

        How_can_I_highlight_values_based_on_separate_list

         

        Best Regards,

        Dale