cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
RanjanThammaiah
Helper V
Helper V

Conditional Formatting to One value in a column

Hi All,

 

Is there any way I can apply conditional formatting to the only YTD in a Period type field?

Actuals Greater than Full Year plans then Red else Green. Currently, it's applying for all WTD, MTD, and YTD. but I need the formatting should only for YTD.

 

 Conditional Formatting.png 

 

 

Regards,

Ranjan

 

 

1 ACCEPTED SOLUTION
v-angzheng-msft
Community Support
Community Support

Hi, @RanjanThammaiah 

 

Try to create a measure like below:

_Color =
IF (
    MAX ( 'Data'[Period Type] ) = "YTD",
    SWITCH (
        TRUE (),
        SELECTEDVALUE ( Data[Actuals] ) > SELECTEDVALUE ( Data[Full Year Plan] ), "Red",
        "Green"
    )
)

Sample:

v-angzheng-msft_0-1621491884976.jpeg

v-angzheng-msft_1-1621491884978.jpeg

 

Result:

v-angzheng-msft_2-1621491884981.jpeg

 

 

Is this the result you want? Hope this is useful to you

Please feel free to let me know If you have further questions

 

 

Best Regards,
Community Support Team _ Zeon Zheng
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
v-angzheng-msft
Community Support
Community Support

Hi, @RanjanThammaiah 

 

Try to create a measure like below:

_Color =
IF (
    MAX ( 'Data'[Period Type] ) = "YTD",
    SWITCH (
        TRUE (),
        SELECTEDVALUE ( Data[Actuals] ) > SELECTEDVALUE ( Data[Full Year Plan] ), "Red",
        "Green"
    )
)

Sample:

v-angzheng-msft_0-1621491884976.jpeg

v-angzheng-msft_1-1621491884978.jpeg

 

Result:

v-angzheng-msft_2-1621491884981.jpeg

 

 

Is this the result you want? Hope this is useful to you

Please feel free to let me know If you have further questions

 

 

Best Regards,
Community Support Team _ Zeon Zheng
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

amitchandak
Super User IV
Super User IV

@RanjanThammaiah , You can but a condition like

With help from conditional formatting measure you can do

 

color =

if(max(Period Type]) ="YTD" ,

Switch ( true()

[Measure] < 100000 ,"red",

// add conditions 

"Green"

), "White")

 

 

Use in conditional formatting using field value option

 

refer for steps

How to do conditional formatting by measure and apply it on pie?: https://youtu.be/RqBb5eBf_I4



Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
Dashboard of My Blogs !! YouTube Channel !! Connect on Linkedin

Proud to be a Super User!

Helpful resources

Announcements
PBI User Groups

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Get Ready for Power BI Dev Camp

Power BI Dev Camp - June 24th

Mark your calendars and join us for our next Power BI Dev Camp!

Top Solution Authors
Top Kudoed Authors