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

Prepping for a Fabric certification exam? Join us for a live prep session with exam experts to learn how to pass the exam. 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
May PBI 25 Carousel

Power BI Monthly Update - May 2025

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

Notebook Gallery Carousel1

NEW! Community Notebooks Gallery

Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.

May 2025 Monthly Update

Fabric Community Update - May 2025

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