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
jenmar2023
Helper I
Helper I

Red/Yellow/Green Indicator visual

Hi, I have a matrix visual and what I'm trying to display is only one indicator for each state BUT if a state has more than 1 color then the color that needs to appear is in this order (R, Y, then G).  So for AK it needs to display R, AL = Y, AR = R and AZ = R

 

     G          R           Y

AK 1          1

AL 1                       1

AR             1

AZ             1           1

....

Any suggestions? Thank you

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @jenmar2023 ,

I have created a simple sample, please refer to my pbix file to see if it helps you.

Create 2 measures.

Measure =
SWITCH (
    TRUE (),
    MAX ( 'Table'[color] ) = "R", 1,
    MAX ( 'Table'[color] ) = "Y", 2,
    MAX ( 'Table'[color] ) = "G", 3,
    BLANK ()
)
Color Measure =
VAR _MIN =
    MINX (
        FILTER ( ALL ( 'Table' ), 'Table'[item] = SELECTEDVALUE ( 'Table'[item] ) ),
        [Measure]
    )
RETURN
    SWITCH (
        TRUE (),
        _MIN = 1, "Red",
        _MIN = 2, "Yellow",
        _MIN = 3, "Green",
        BLANK ()
    )

 

vrongtiepmsft_0-1698201321934.png

 

How to Get Your Question Answered Quickly 

 

If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .

 

Best Regards
Community Support Team _ Rongtie

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

2 REPLIES 2
Anonymous
Not applicable

Hi @jenmar2023 ,

I have created a simple sample, please refer to my pbix file to see if it helps you.

Create 2 measures.

Measure =
SWITCH (
    TRUE (),
    MAX ( 'Table'[color] ) = "R", 1,
    MAX ( 'Table'[color] ) = "Y", 2,
    MAX ( 'Table'[color] ) = "G", 3,
    BLANK ()
)
Color Measure =
VAR _MIN =
    MINX (
        FILTER ( ALL ( 'Table' ), 'Table'[item] = SELECTEDVALUE ( 'Table'[item] ) ),
        [Measure]
    )
RETURN
    SWITCH (
        TRUE (),
        _MIN = 1, "Red",
        _MIN = 2, "Yellow",
        _MIN = 3, "Green",
        BLANK ()
    )

 

vrongtiepmsft_0-1698201321934.png

 

How to Get Your Question Answered Quickly 

 

If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .

 

Best Regards
Community Support Team _ Rongtie

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

 

 

 

 

jenmar2023
Helper I
Helper I

OR is there a way to create a column that says if there's a Red, then Red
or if Red doesn't exist, the next one is Yellow, otherwise Green

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!

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.