cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
raymondpocher
Advocate III
Advocate III

Conditional Formatting with Switch and Selected Measure or Value

Hello,

 

I have a ton of measures in cards and want to color code them. The color coding rule is always the same. Problem is, how can I apply it to all of my different measures.

 

Since it would be ridiculous to manually define each color condition I am looking for way to do that all at once. 

 

I was super excited to use the selected measure function of dax...but it wasn't working. Can anyone help?

 

 

Sample Color Coding Background = 
SWITCH(
    TRUE(),
        SELECTEDMEASURE() < 0.8, "#E34858",
        SELECTEDMEASURE() < 0.95, "#EB6F24",
        SELECTEDMEASURE() > 0.95, "#2EA675"
)

 

 

And I cant use Tabular Editor since it is blocked from our IT.

5 REPLIES 5
tavolo89
Frequent Visitor

Did you ever find an answer to this? I'm trying to do the same via Tabular Editor using SELECTEDMEASURE() but it does nothing for the font colour.

bpn1973
Resolver II
Resolver II

I'm struggling with the same problem.
Did u find a workaround?
Calculation item measure cant be applied btw.

bpn1973_0-1644183948162.png

but the measure is greyed out when trying to use it as condition

bpn1973_1-1644184020941.png

 

 

raymondpocher
Advocate III
Advocate III

@amitchandak : do you know if there is a free version? Or do you have any experience on that regarding licensing. Would only the person that creates the report need a tabular license or anyone who views a report?

amitchandak
Super User
Super User

@raymondpocher , as far as I know, you have to create it from tabular editor only.

Appreciate your logic. Good Idea to reduce measures.

Thanks but seriously? 😄 

Helpful resources

Announcements
PBI Sept Update Carousel

Power BI September 2023 Update

Take a look at the September 2023 Power BI update to learn more.

Learn Live

Learn Live: Event Series

Join Microsoft Reactor and learn from developers.

Dashboard in a day with date

Exclusive opportunity for Women!

Join us for a free, hands-on Microsoft workshop led by women trainers for women where you will learn how to build a Dashboard in a Day!

MPPC 2023 PBI Carousel

Power Platform Conference-Power BI and Fabric Sessions

Join us Oct 1 - 6 in Las Vegas for the Microsoft Power Platform Conference.

Top Solution Authors