Reply
PaulBethancourt
Frequent Visitor
Partially syndicated - Outbound

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
v-xuxinyi-msft
Community Support
Community Support

Syndicated - Outbound

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
v-xuxinyi-msft
Community Support
Community Support

Syndicated - Outbound

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.

Syndicated - Outbound

Excellent solution!  Thank you.

Dangar332
Super User
Super User

Syndicated - Outbound

hi, @PaulBethancourt 

 

not a conditional formatting but it may help you

Dangar332_1-1704561479592.png

 

 

Dangar332_0-1704561406399.png

 

avatar user

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

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

Feb2025 NL Carousel

Fabric Community Update - February 2025

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

Top Solution Authors (Last Month)
Top Kudoed Authors (Last Month)