Forum Discussion

Brian415_'s avatar
Brian415_
Frequent Visitor
2 years ago
Solved

Stoplight / Traffic Light System Dashboard

I have a dataset in Power BI.


This dataset has 2 columns: Student Name, Status Transition Next Year. The first column is the name of the students and the second column is used to track the status whether they are allowed to go to next year.

 

I have a table with all the students and the status on the dashboard. You then have the option to filter by specific student name.

 

A brief example of my dataset:
*Name* - * Status Transition Next Year*
Johnny - Passed
Lisa - Pending, Busy With Discussions
Kevin - Pending, Waiting for last exam
Michelle - Failed

 

I want to display the results in a traffic light in Power BI.

 

I want to display the results as follows:
Passed - Green
Pending, Busy With Discussions - Orange
Pending, Waiting for last exam - Orange
Failed - Red

 

I would like if in the traffic light you can see a tooltip with the exact status. So suppose you see 'orange' - that you can see exactly which of the 2 statuses it is.

 

The stoplight should always show red if it has not filtered for a specific student.

 

Do you guys know the best way I can go about this? Thank you in advance!

  • Anonymous's avatar
    Anonymous
    2 years ago

    Hi Brian415_ ,

    Is the traffic light a custom visual? It requires the purchase of a license, which I was unable to test further.
    Please try this measure:

     

    Measure = 
    SWITCH(
        TRUE(),
        ISBLANK(SELECTEDVALUE('Table'[Status Transition Next Year])),"Red",
        SELECTEDVALUE('Table'[Status Transition Next Year])="Passed","Green",
        SELECTEDVALUE('Table'[Status Transition Next Year])="Failed","Red",
        SELECTEDVALUE('Table'[Status Transition Next Year]) IN {"Pending, Busy With Discussions","Pending, Waiting for last exam"},"Orange"
        )

     

    Or you mean this?

     

    Please try this:


    Best Regards,
    Gao

    Community Support Team

     

    If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly.
    If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

    How to get your questions answered quickly --  How to provide sample data in the Power BI Forum

2 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Brian415_ ,

    Is the traffic light a custom visual? It requires the purchase of a license, which I was unable to test further.
    Please try this measure:

     

    Measure = 
    SWITCH(
        TRUE(),
        ISBLANK(SELECTEDVALUE('Table'[Status Transition Next Year])),"Red",
        SELECTEDVALUE('Table'[Status Transition Next Year])="Passed","Green",
        SELECTEDVALUE('Table'[Status Transition Next Year])="Failed","Red",
        SELECTEDVALUE('Table'[Status Transition Next Year]) IN {"Pending, Busy With Discussions","Pending, Waiting for last exam"},"Orange"
        )

     

    Or you mean this?

     

    Please try this:


    Best Regards,
    Gao

    Community Support Team

     

    If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly.
    If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

    How to get your questions answered quickly --  How to provide sample data in the Power BI Forum