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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
Anonymous
Not applicable

Alternate color for each 3 rows

Hello All,

 

Below is  my data and I need to color (background) for each 3 rows.

Date 5/5/2021 and 5/7/2021 rows has to fill with backgorund blue colors. Rest background will be white.

 

Please suggest.

 

DateSampleP1P2P3
5/4/2021110.4110.3110.14
5/4/2021210.5210.5910.94
5/4/2021310.6910.4110.37
5/5/2021110.8410.5910.47
5/5/2021210.210.019.88
5/5/2021310.4910.3610.26
5/6/2021110.2710.6110.35
5/6/2021210.189.859.9
5/6/2021310.7810.9410.28
5/7/2021110.8410.5910.47
5/7/2021210.210.019.88
5/7/2021310.4910.3610.26
2 ACCEPTED SOLUTIONS
amitchandak
Super User
Super User

@Anonymous , Create a measure like below and use that in conditional formatting using field value option

 

meausre =

if(max(Table[Date]) >= Date(2021,5,5)  && max(Table[Date]) <= Date(2021,5,7) , "Yellow", "White")

 

You have to use this measure for conditional formatting using the field value option, use for each column

 

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

View solution in original post

Anonymous
Not applicable

Thank you @amitchandak . You are awesome. 

Some how I have given dummy data. Orignially I have two months data and need to color for each alternate date with yellow and while. So I have used below formula and it worked. Thanks again for your time.

 

Color = IF(ISEVEN(RANKX(ALLSELECTED('Table'),CALCULATE(SELECTEDVALUE(''[Date])),,ASC,Dense)) = TRUE(),1,0)

View solution in original post

2 REPLIES 2
amitchandak
Super User
Super User

@Anonymous , Create a measure like below and use that in conditional formatting using field value option

 

meausre =

if(max(Table[Date]) >= Date(2021,5,5)  && max(Table[Date]) <= Date(2021,5,7) , "Yellow", "White")

 

You have to use this measure for conditional formatting using the field value option, use for each column

 

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

Anonymous
Not applicable

Thank you @amitchandak . You are awesome. 

Some how I have given dummy data. Orignially I have two months data and need to color for each alternate date with yellow and while. So I have used below formula and it worked. Thanks again for your time.

 

Color = IF(ISEVEN(RANKX(ALLSELECTED('Table'),CALCULATE(SELECTEDVALUE(''[Date])),,ASC,Dense)) = TRUE(),1,0)

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

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