Forum Discussion

fdanielsouza's avatar
fdanielsouza
Helper I
5 years ago
Solved

Highlight bug with boolean measures

Hi, I noticed that the highlight array have the same values of the data array, but with nulls where points aren't selected. When the measure returns a boolean value, however, the array gives falses instead of nulls, hence we can't highlight a data value of "false", since all values in the highlight array are false. See example below

 

when the measure returns booleanwhen measure returns anything else

 

  • Anonymous's avatar
    Anonymous
    5 years ago

    HI fdanielsouza,

    Have you tried to use a column with other type values? Bool type is different than common visuals and they may affect/conflict with the visual render and analysis. (AFAIK, sometimes they can be defined to control to enable some features)

    In addition, you can also contact to power bi team and attach your sample pbix file to help them reproduce and confirm this scenario.
    Regards,

    Xiaoxin Sheng

6 Replies

    • fdanielsouza's avatar
      fdanielsouza
      Helper I

      Hi Anonymous , it's a categorical visual with one category field and a values field that accepts several measures. For highlighting I'm using the options.dataViews[0].categorical.values[0].highlights array to determine if a value is highlighted or not, but the behaviour changes when I use a measure like SELECTEDVALUE([boolean_column]). Instead of give nulls, it give falses. So, if the highlighted value is a false, then the entire array will be of falses, which hinders the highlighting.