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

The ultimate Microsoft Fabric, Power BI, Azure AI & SQL learning event! Join us in Las Vegas from March 26-28, 2024. Use code MSCUST for a $100 discount. Register Now

Reply
Anonymous
Not applicable

Conditional Formatting - measures not available

I want to color brands based on Profit by Year.

ProfitLastYear = 
var NumbDays = 
    if(
        TODAY() - FIRSTNONBLANK(Verkoopslijnen[Datum], 1) <= 365
        , TODAY() - FIRSTNONBLANK(Verkoopslijnen[Datum], 1)
        , 365
    )

RETURN
   DIVIDE(
        CALCULATE(
            SUM(Verkoopslijnen[Winst])
            , Kalender[Date] >= TODAY() - NumbDays
        )
        , NumbDays
   )

Second Measure is:

ColorPicker = 
SWITCH(
    TRUE()
    , [ProfitLastYear] < 5, "#00FF00"
    , [ProfitLastYear] < 100, "#FFFF00"
    , [ProfitLastYear] <10000, "#FF0000"
    , "#C0C0C0"
)

Now, I want to use the ColorPicker as conditional Format on my brands, but I cannot click on the measures2018-09-27 14_55_01-.png

What Am I doing wrong?

4 REPLIES 4
Aleuzzi
New Member

Hi,

I had the same issue, and I solved it by changing the measure Data type as Text.

Select the color measure, go to Modeling -> Formatting -> Data Type -> Text and try againg the conditional formatting by field.


Cheers

v-cherch-msft
Employee
Employee

Hi @Anonymous

 

Here is the document for your reference.

https://docs.microsoft.com/en-us/power-bi/desktop-conditional-table-formatting#color-formatting-by-field-value

 

Regards,

Cherie

Community Support Team _ Cherie Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Sean
Community Champion
Community Champion

When you open the conditional formatting window in the 

Format By you need to select Field Value

then you should be able to select your Measure in Based on Field Smiley Happy

Anonymous
Not applicable

Sean, I know, but it's still impossible to click on the measure :2018-09-28 08_33_38-.png

Helpful resources

Announcements
Fabric Community Conference

Microsoft Fabric Community Conference

Join us at our first-ever Microsoft Fabric Community Conference, March 26-28, 2024 in Las Vegas with 100+ sessions by community experts and Microsoft engineering.

February 2024 Update Carousel

Power BI Monthly Update - February 2024

Check out the February 2024 Power BI update to learn about new features.

Fabric Career Hub

Microsoft Fabric Career Hub

Explore career paths and learn resources in Fabric.

Fabric Partner Community

Microsoft Fabric Partner Community

Engage with the Fabric engineering team, hear of product updates, business opportunities, and resources in the Fabric Partner Community.