cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
tex628 New Contributor
New Contributor

Conditional formatting

Hello, I have a measure that I need to have conditional formatting applied on. But for some reason It does not respond to the formatting. Does anyone have any idea of the reason, and how the formatting can be applied?

 

Measure deliv = CALCULATE(SUMX('Delivery Q2';'TS Delivery Q2'[On Time])/sum('Delivery Q2'[Total # of order lines]))*100
Calc-value = IF(ISBLANK([Measure deliv]);0;
                    IF(0,2*[Measure deliv]-16<0;0;
                        IF('Delivery Q2'[Measure deliv]<85;0,2*[Measure deliv]-16;
                            IF([Measure deliv]<96;0,1818*[Measure deliv]-14,445;
                                IF([Measure deliv]-93>5;5;[Measure deliv]-93)
                                )
                             )
                          )
                       )

Calc value will return values between 0-5 and is the measure that i want to apply formatting to.

1 ACCEPTED SOLUTION

Accepted Solutions
v-yulgu-msft Super Contributor
Super Contributor

Re: Conditional formatting

Hi @tex628,

 

Based on my test, the returned value of [Calc-value] is changed dynamically depend on the actual value of [Measure deliv]. 

 

What do you mean " but the formatting doesn't work."? Please describe your scenario with sample data. Also, please show us what the correct result should be and what the incorrect result you have got.

 

Regards,

Yuliana Gu

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
6 REPLIES 6
Super User
Super User

Re: Conditional formatting

When you say that it doesn't respond to formatting, are you saying that you don't get the option or that when you configure the formatting that it doesn't work?


Did I answer your question? Mark my post as a solution!

Proud to be a Datanaut!


tex628 New Contributor
New Contributor

Re: Conditional formatting

I get the option, but the formatting doesn't work. 

Super User
Super User

Re: Conditional formatting

Which version of Power BI are you on? I just did this for a measure defined as below on the June 2018 version and it worked perfectly:

 

DiconnectedTableTrick = 
VAR __myVariable = 
SWITCH(
    MAX([Category]),
    "0-50 percent",1,
    "51-75 percent",2,
    "75-100 percent",3
)
RETURN __myVariable

Did I answer your question? Mark my post as a solution!

Proud to be a Datanaut!


tex628 New Contributor
New Contributor

Re: Conditional formatting

Version: 2.59.5135.601 64-bit (juni 2018),

 

I dont know why it isnt working, i'm wondering if it has something to do with the data format but from what i can tell everything is formatted to numeric values.

 

/ Johannes

v-yulgu-msft Super Contributor
Super Contributor

Re: Conditional formatting

Hi @tex628,

 

Based on my test, the returned value of [Calc-value] is changed dynamically depend on the actual value of [Measure deliv]. 

 

What do you mean " but the formatting doesn't work."? Please describe your scenario with sample data. Also, please show us what the correct result should be and what the incorrect result you have got.

 

Regards,

Yuliana Gu

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
tex628 New Contributor
New Contributor

Re: Conditional formatting

What i meant was that the conditional formatting did not work. But i solved the issue, in my table i had a value incorrectly displayed as "First value" by removing the summarization the formatting started working Smiley Happy

 

/ J

Helpful resources

Announcements
Back to School Contest

Back to School Contest

Engage and empower students with Power BI!

MBAS Gallery

Watch Sessions On Demand!

Continue your learning in our online communities.

Summit Australia 2019

Summit Australia 2019

Travel to Melbourne and network with thousands of peers!

PBI Community Highlights

PBI Community Highlights

Check out what's new in the Power BI Community!

Top Ideas
Users Online
Currently online: 6 members 3,564 guests
Please welcome our newest community members: