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
fdanielsouza
Helper I
Helper I

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 the measure returns booleanwhen measure returns anything elsewhen measure returns anything else

 

1 ACCEPTED SOLUTION

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

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

View solution in original post

6 REPLIES 6
v-shex-msft
Community Support
Community Support

HI @fdanielsouza,

What type of visual and measure formula are you worked on? Can you please share some dummy data to test?

How to Get Your Question Answered Quickly  

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

Hi @v-shex-msft , 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.

HI @fdanielsouza,

I think this may relate to selectedvalue function.

SELECTEDVALUE function - DAX | Microsoft Docs
AFAIK, selectedvalue not suitable for multiple selections. if you do not add 'alternate result' to selectedvalue function, it will invoke 'blank' function to handle this exception result.(mutiple item seleciton)

BLANK function (DAX) - DAX | Microsoft Docs

Handling BLANK in DAX - SQLBI
If you add this optional parameter in selectedvalue function, did these parts still get the wrong results?

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

I don't think it's related to the function per se, because if I use an implicit measure in a boolean column (like "first this_boolean_column") the problem stands

Thanks @v-shex-msft , so I'll just stick to a warn in the visual's landing page. 

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

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

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.