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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

**BUG** Measures that return strings no longer useable for conditional formatting

When creating field value conditional formatting, Power BI no longer accepts measures that evaluate to strings. This hasn't been the case but apparently changed in an update or with a feature at some point.

 

BUG BEHAVIOR

For example, let's say I have a measure called Red that contains a string as follows:

Red = "#CF000F"

 

I then have a formatting measure that references that measure:

SlicerTitle = [Red]

 

The SlicerTitle measure can now no longer be added to Field Value conditional formatting:

arpost_0-1694621292062.png

ODD BEHAVIOR

However, visuals that had this measure added successfully in the past still work. Additionally, it starts working if I:

  1. Change the [SlicerTitle] reference to the [Red] measure to an explicit color string (i.e., SlicerTitle = "#CF000F").
  2. Add the measure as field value formatting to a visual (PBI accepts this because strings are explicitly written).
  3. Add the reference to the [Red] measure back in after adding to visual (i.e., change SlicerTitle = "#CF000F" back to SlicerTitle = [Red]).

 

REALLY hope this gets fixed as it is incredibly frustrating to have to do workarounds.

Status: Investigating
Comments
Anonymous
Not applicable

Hi @arpost ,

 

I am unable to reproduce your question.

This is my Desktop version:

vtangjiemsft_0-1694679906162.png

vtangjiemsft_1-1694679917560.png vtangjiemsft_2-1694679917561.png

vtangjiemsft_3-1694679943508.png

 

vtangjiemsft_4-1694679943512.png

It's working fine. Please update Power BI Desktop to the latest version.

 

Best Regards,
Community Support Team _ Neeko

 

 

 

arpost
Post Prodigy

Greetings, @Anonymous. Appreciate the reply. I downloaded the latest version (2.121.662.0 64-bit) but am still experiencing this behavior. I'm using the Microsoft Store version.

 

arpost_0-1694698504348.png

 

Out of curiosity, can you try to add your SlicerTitle measure as conditional formatting to a slicer header's font color?

 

arpost_1-1694698555911.png

 

arpost
Post Prodigy

Update: @Anonymous, this looks to be caused by the use of calculations groups in the report. I tested the same measure approach in a report not using calc. groups and had no issue; when I added a calc. group to the report, it stopped working.

 

Which doesn't make any sense since these measures are explicit strings. I know calc. groups discourage implicit measures, but these measures should work for conditional formatting. Plus, they do work already for other visuals in the report; I just can't use the measures to format new visuals. Can this get fixed?

arpost
Post Prodigy

Any update, @Anonymous?