Forum Discussion

maurcoll's avatar
maurcoll
Helper IV
2 months ago
Solved

Conditional Format on date change

Hi is it possible to conditional format a matrix if a number has changed between dates. I have two dates that i am comparing the ordered date and the order due date. I want to format if the total order number change

 

Ordered Date / Order Due Date15/06/2616/06/2617/06/26
01/05/2625283
02/05/2626253
03/05/2626253

I want to be able to highlight the changes as identified in the above so the based on the ordered date

  • maurcoll 

    Change Color = 
    VAR _current = [Order Count]
    VAR _prev =
    CALCULATE(
    [Order Count],
    PREVIOUS('DueDate'[Order Due Date])
    )
    RETURN
    IF(_current <> _prev && NOT ISBLANK(_prev), "#FFFF00", "#FFFFFF")

    Set the matrix cell background to Field Value using this measure.

2 Replies

  • Hi maurcoll,

     

    Yes, you can achieve it by creating a measure for apply color change. 

     

    Create a measure with your conditions.

    add your required data to matrix

    go to cell elements -> select where you want to apply change (e.g.Background or font)

    Select the measure which you just created

     

    Attached is an example .pbix for you.

     

    ๐ŸŒŸ I hope this solution helps you unlock your Power BI potential! If you found it helpful, click 'Mark as Solution' to guide others toward the answers they need.
    ๐Ÿ’ก Love the effort? Drop the kudos! Your appreciation fuels community spirit and innovation.
    ๐ŸŽ– As a proud SuperUser and Microsoft Partner, weโ€™re here to empower your data journey and the Power BI Community at large.
    ๐Ÿ”— Curious to explore more? [Discover here].
    Letโ€™s keep building smarter solutions together!

  • maurcoll 

    Change Color = 
    VAR _current = [Order Count]
    VAR _prev =
    CALCULATE(
    [Order Count],
    PREVIOUS('DueDate'[Order Due Date])
    )
    RETURN
    IF(_current <> _prev && NOT ISBLANK(_prev), "#FFFF00", "#FFFFFF")

    Set the matrix cell background to Field Value using this measure.