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

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

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
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.