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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Yoshimitsu411
Resolver I
Resolver I

Conditionally Format a Switch Measure in Matrix

Hello

 

I followed a very helpful article to create the switch measures below. 

 

Header Measure Order = 
    Max('Matrix Headers'[Order])

 

 

Header Measure Value = 
SWITCH([Header Measure Order],
    1, [Actuals],
    2, [Budget],
    3, [Purchases],
    4, [Sales],
    5, [Sample 1],
    6, [Sample 2]
)

 

 

What I would like to do is condinally format the measure. When Actuals > Budget show the Actuals value in Green and Budget in Red. Same for Purchases and Sales and so on.

 

I have tried using Field Value but it changes the colours for all the values and not individually in the matrix.

 

Thank you for any help.

 

Yoshi

1 ACCEPTED SOLUTION
Yoshimitsu411
Resolver I
Resolver I

Nevermind, I solved it.

 

Format Table =
SWITCH([Header Measure Value],
    [A Actuals],
        SWITCH(TRUE(),
            [A Actuals] > [B Budget], "#3CB371", "#FF6347"
        ),
    [B Budget],
        SWITCH(TRUE(),
            [B Budget] > [A Actuals], "#3CB371", "#FF6347"
        ),
    "#FF6347"
    )

View solution in original post

1 REPLY 1
Yoshimitsu411
Resolver I
Resolver I

Nevermind, I solved it.

 

Format Table =
SWITCH([Header Measure Value],
    [A Actuals],
        SWITCH(TRUE(),
            [A Actuals] > [B Budget], "#3CB371", "#FF6347"
        ),
    [B Budget],
        SWITCH(TRUE(),
            [B Budget] > [A Actuals], "#3CB371", "#FF6347"
        ),
    "#FF6347"
    )

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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