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

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

Reply
Pedro_Lourenco
Frequent Visitor

Conditional formatting table rows

Hi,

 

I'm working on the table below.

 

tabela.PNG

 

This table is showing the last quantity registered of the products in the storage by year/month/week or day (according to the drill-down ).

 

The Visual Value space is filled with this measure:

Last quantity registred= CALCULATE(SUM([Quant.]; LASTDATE ([date]))

 

As you can see, I'm trying to put some conditional format to indicate when the quantity increased ou decreased in comparison to the column on its left but I did not figure out yet...

 

Someone can help me, please?

 

EDIT**

 

Here is a .pbi file for an example

 

https://1drv.ms/u/s!Al373jcLzQYn8E9VlQR5Tns3pSqI?e=cgoLfp

3 REPLIES 3
v-lid-msft
Community Support
Community Support

Hi @Pedro_Lourenco ,

 

We can use the following steps to meet your requirement.

 

1. Create an icon measure,

 

Icon Set Measure = 
VAR difference =
    VAR sum__ =
        VAR cdate =
            MAX ( 'Table'[Date] )
        VAR pdate =
            CALCULATE (
                MAX ( 'Table'[Date] ),
                FILTER ( ALL ( 'Table' ), 'Table'[Date] < cdate )
            )
        RETURN
            CALCULATE (
                SUM ( 'Table'[Quant] ),
                FILTER ( ALL ( 'Table' ), 'Table'[Date] = pdate )
            )
    VAR sum_Q =
        CALCULATE ( SUM ( 'Table'[Quant] ) )
    RETURN
        sum_Q - sum__
RETURN
SWITCH ( TRUE (), difference < 0, -1, difference > 0, 1, 0 )

 

 2. Then we can configure the [Last quantity registred]’s icon based on [Icon Set Measure],

 

39.png40.png

 

3. At last we can get the result like this,

 

41.png

 

If it doesn’t meet your requirement, could you please show the exact expected result based on the table that we have shared?

 

BTW, pbix as attached.

 

Best regards,

 

Community Support Team _ Dong Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

I Edited the post and inserted a pbix file so It could be easy to understand.

 

Basically I want to conditional formating based on the difference of the numbers in the columns by product, even when I drill up or down to see different time periods.

 

 

VijayP
Super User
Super User

The Question is not much clear. I can see the trend if the left column is high current column showing red and vice a versa

Request you to eloberate the problem statement




Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
MY Blog || My YouTube Channel || Connect with me on Linkedin || My Latest Data Story - Ageing Analysis

Proud to be a Super User!


Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.