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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

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
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.