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
TS-Callum
Frequent Visitor

Help with a complex DAX query for a traffic light system

Hi all,

 

I am creating a report that will feature a traffic light system for the first page of the report that management can easily see at a glance how various sections of the business are doing with a green, orange or red circle (in this case, the support team)

 

In order to create this, I decided a new table would may be required and I will need to write some DAX that outputs an image URL based on whether there were 6 breached or warning incidents that month for the selected customer.

 

Please see the below example data for my source table -

 

exampledata3.PNG

 

 

Essentially, only for the current month and only for a selected customer (as per synced slicer selection) I am wanting to do a count of EscalationLevel per category. My new table should ideally look similar to the below -

 

exampledata2.PNG

 

I am then going to write another quick DAX query in another new table that will grab these values, sum Breach and Warning together, and display an image URL which is a green circle if the result is 0, orange circle if the result is 1-3, and a red circle if the result is over 6.

 

Am I going about this the wrong way, or is there an even easier alternative?

 

I hope this makes sense, I'm pretty terrible at explaining sometimes so please feel free to ask me for further information.

 

Any guidance would be hugely appreciated. Thanks!

1 ACCEPTED SOLUTION
v-chuncz-msft
Community Support
Community Support

@TS-Callum,

 

You just need to take advantage of measure below.

Measure =
COUNTROWS (
    FILTER ( Table1, Table1[EscalationLevel] IN { "Breach", "Warning" } )
)
Community Support Team _ Sam Zha
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

1 REPLY 1
v-chuncz-msft
Community Support
Community Support

@TS-Callum,

 

You just need to take advantage of measure below.

Measure =
COUNTROWS (
    FILTER ( Table1, Table1[EscalationLevel] IN { "Breach", "Warning" } )
)
Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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.