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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
PaulBethancourt
Frequent Visitor

Table Conditional Formatting based on Values

I'm looking for a way to format the background colors based on a break of Fake Invoice #'s.  I just  need the first row colored, like the example below.  I don't knnow if this is even possible.

PaulBethancourt_0-1704559043261.png

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @PaulBethancourt 

 

You can try the following steps:

 

1. Add an index column to a table in the Power Query.

vxuxinyimsft_0-1704777612587.png

 

If the index column is not added, the effect in the table visualization is shown below.

vxuxinyimsft_1-1704778214549.png

 

2. Create several measures as follow:

Measure = 
    VAR _t = ADDCOLUMNS('Table', "Group", RANKX(ALL('Table'), [Fake Invoice #], [Fake Invoice #], ASC, Dense))
RETURN 
    SUMX(_t,[Group])

 

formatting = IF(ISODD([Measure]), "yellow", "green")

 

3. Make the Conditional Formatting settings as shown here.

vxuxinyimsft_2-1704778540509.png

 

vxuxinyimsft_3-1704778578109.png

 

vxuxinyimsft_4-1704778699882.png

Is this the result you expect?

 

Best Regards,
Community Support Team _Yuliax

 

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

3 REPLIES 3
Anonymous
Not applicable

Hi @PaulBethancourt 

 

You can try the following steps:

 

1. Add an index column to a table in the Power Query.

vxuxinyimsft_0-1704777612587.png

 

If the index column is not added, the effect in the table visualization is shown below.

vxuxinyimsft_1-1704778214549.png

 

2. Create several measures as follow:

Measure = 
    VAR _t = ADDCOLUMNS('Table', "Group", RANKX(ALL('Table'), [Fake Invoice #], [Fake Invoice #], ASC, Dense))
RETURN 
    SUMX(_t,[Group])

 

formatting = IF(ISODD([Measure]), "yellow", "green")

 

3. Make the Conditional Formatting settings as shown here.

vxuxinyimsft_2-1704778540509.png

 

vxuxinyimsft_3-1704778578109.png

 

vxuxinyimsft_4-1704778699882.png

Is this the result you expect?

 

Best Regards,
Community Support Team _Yuliax

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Excellent solution!  Thank you.

Dangar332
Super User
Super User

hi, @PaulBethancourt 

 

not a conditional formatting but it may help you

Dangar332_1-1704561479592.png

 

 

Dangar332_0-1704561406399.png

 

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.