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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Shameem
Regular Visitor

Compare previous data and highlight the change

Hello,

 

We have a requirement where I need to highlight the change in category.

 

I have Product, Plan , Time Period and Category fields . All fields are coming from different tables of data model.

 

Expected  to highlight ID:  3, 7 (as they have change in category)

 

IDProductPlanTime PeriodCategory
1Prod1Plan12024-012
2Prod1Plan12024-022
3Prod1Plan12024-031
4Prod1Plan22024-012
5Prod1Plan22024-022
6Prod2Plan12024-011
7Prod2Plan12024-024

 

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi,@Shameem I am glad to help you.
Hello,@lbendlin ,thanks for your concern about this issue.

Your answer is excellent!
And I would like to share some additional solutions below.


Did you get your problem solved? If you don't have a suitable solution for your problem, you can refer to my suggestion.
By creating a measure and setting a conditional format based on the value of the measure.

vjtianmsft_0-1721637825376.png

 

 

M_Pro_plan_Changed02 = 
VAR CurrentCategory = MAX('Table'[Category])
VAR PreviousCategory = 
    CALCULATE(
        MAX('Table'[Category]),
        FILTER(
            ALL('Table'),
            'Table'[Product] = MAX('Table'[Product]) &&
            'Table'[Plan] = MAX('Table'[Plan]) &&
            'Table'[Time Period] < MAX('Table'[Time Period])
        )
    )
RETURN
IF(
    ISBLANK(PreviousCategory) || CurrentCategory = PreviousCategory,
    0,
    1
)

 

 

vjtianmsft_1-1721637884901.png

 

vjtianmsft_2-1721637895955.pngvjtianmsft_3-1721637903243.pngvjtianmsft_4-1721637911461.png

 

I hope my suggestions give you good ideas, if you have any more questions, please clarify in a follow-up reply.

Best Regards,

Carson Jian,

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,@Shameem I am glad to help you.
Hello,@lbendlin ,thanks for your concern about this issue.

Your answer is excellent!
And I would like to share some additional solutions below.


Did you get your problem solved? If you don't have a suitable solution for your problem, you can refer to my suggestion.
By creating a measure and setting a conditional format based on the value of the measure.

vjtianmsft_0-1721637825376.png

 

 

M_Pro_plan_Changed02 = 
VAR CurrentCategory = MAX('Table'[Category])
VAR PreviousCategory = 
    CALCULATE(
        MAX('Table'[Category]),
        FILTER(
            ALL('Table'),
            'Table'[Product] = MAX('Table'[Product]) &&
            'Table'[Plan] = MAX('Table'[Plan]) &&
            'Table'[Time Period] < MAX('Table'[Time Period])
        )
    )
RETURN
IF(
    ISBLANK(PreviousCategory) || CurrentCategory = PreviousCategory,
    0,
    1
)

 

 

vjtianmsft_1-1721637884901.png

 

vjtianmsft_2-1721637895955.pngvjtianmsft_3-1721637903243.pngvjtianmsft_4-1721637911461.png

 

I hope my suggestions give you good ideas, if you have any more questions, please clarify in a follow-up reply.

Best Regards,

Carson Jian,

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

lbendlin
Super User
Super User

Do you want this done in Power Query, as a calculated column, a measure, or as a visual calculation?  What is your sort column? ID?

Hello,  It can be as a calculated column, a measure, or as a visual calculation anything that is feasiable , 

The idea is to have the background colur of a column 'Access' highlighted in vizualization when the catogeroy is changed.

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

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.