Skills Advisor | Data Visualization

Automatic Chart Highlighting for Target Organization

This guide outlines how to enhance a chart in Power BI by automatically positioning and highlighting the NHS Bath and North East Somerset, Swindon and Wiltshire Integrated Care Board, ensuring it stands out alongside other organizations


Empty image or helper icon

Prompt

i have a chart that shows 42 organisations, including organisation A highlighted in green, however the issue is that i need to drag the slicer to position organisation A to be visible. I want an automatic process that the chart visibility to focus on organisation A without using the slicer to Organisation A here the dax measure that i am currently using for the chart field dax measure: Opido1_ICB = CALCULATE(
    SUM(Fact_Opiod1_ICB[Patients receiving opioid pain medicines per 1,000 patients]),
      
    DatesCalendar[MonthnYear]) the organisation name that is part amongst 42 organisation is Nhs Bath And North East Somerset, Swindon And Wiltshire Integrated Care Board.  this dax measure issue only show NHS Bath And North East Somerset, Swindon And Wiltshire Integrated Care Board but i want to see also the remaining 41 organisations on the chart. So i want the visual chart automatically to show NHS Bath And North East Somerset, Swindon And Wiltshire Integrated Care Board position on the chart withouth using the slicer to drag it to its visible position whilst also showing the remaining organisation before and after NHS Bath And North East Somerset, Swindon And Wiltshire Integrated Care Board position Opido1_ICB_Automated = 
CALCULATE(
    SUM(Fact_Opiod1_ICB[Patients receiving opioid pain medicines per 1,000 patients]),
    DatesCalendar[MonthnYear],
    Fact_Opiod1_ICB[OrganisationName] = "NHS Bath And North East Somerset, Swindon And Wiltshire Integrated Care Board"
) i dont understand this section below Step 2: Visualization Settings
Ensure that in your chart settings, you allow the automatic sorting based on the measure so that the visualization places NHS Bath And North East Somerset, Swindon And Wiltshire Integrated Care Board appropriately.
You may also want to consider using a Data Label to emphasize NHS Bath And North East Somerset, Swindon And Wiltshire Integrated Care Board for better visibility.

Answer

Data Visualization Guidance for Automatic Chart Highlighting

Problem Analysis

The objective is to modify a chart such that it automatically positions the organization "NHS Bath And North East Somerset, Swindon And Wiltshire Integrated Care Board" (hereafter referred to as the Target Organization) without relying on the slicer to adjust its position manually. You want to see the remaining 41 organizations alongside the Target Organization.

Current DAX Measures

You have two DAX measures defined:

  1. Opido1_ICB:

    Opido1_ICB = CALCULATE(
        SUM(Fact_Opiod1_ICB[Patients receiving opioid pain medicines per 1,000 patients]),
        DatesCalendar[MonthnYear]
    )
  2. Opido1_ICB_Automated:

    Opido1_ICB_Automated = CALCULATE(
        SUM(Fact_Opiod1_ICB[Patients receiving opioid pain medicines per 1,000 patients]),
        DatesCalendar[MonthnYear],
        Fact_Opiod1_ICB[OrganisationName] = "NHS Bath And North East Somerset, Swindon And Wiltshire Integrated Care Board"
    )

Proposed Solution

To achieve the desired outcome, the following steps can be taken:

Step 1: Modify the DAX Measure

You will need a DAX measure that includes both the Target Organization and aggregates the rest. This will allow you to visually emphasize the Target Organization without isolating it.

Opido1_ICB_Combined = 
IF(
    SELECTEDVALUE(Fact_Opiod1_ICB[OrganisationName]) = "NHS Bath And North East Somerset, Swindon And Wiltshire Integrated Care Board",
    CALCULATE(
        SUM(Fact_Opiod1_ICB[Patients receiving opioid pain medicines per 1,000 patients]),
        DatesCalendar[MonthnYear]
    ),
    CALCULATE(
        SUM(Fact_Opiod1_ICB[Patients receiving opioid pain medicines per 1,000 patients]),
        DatesCalendar[MonthnYear],
        ALL(Fact_Opiod1_ICB[OrganisationName])
    )
)

Step 2: Visualization Settings

  1. Sorting:

    • Ensure your chart is set to sort by Opido1_ICB_Combined. This way, the Target Organization will automatically be positioned based on its metric, without needing to drag the slicer.
    • In your chart settings, select the measure Opido1_ICB_Combined for sorting.
  2. Data Labels:

    • Add a data label specifically for the Target Organization. This ensures that it stands out in the chart.
    • You can format the data label to be larger or in a different color to improve visibility.

Step 3: Additional Considerations

  • Conditional Formatting: For better visual differentiation, consider applying a conditional formatting rule that highlights the bar for the Target Organization in green, while others remain in a default color.

Summary

By redefining your DAX measure to incorporate both the Target Organization and the rest of the data, alongside proper visualization settings (sorting and labeling), you will achieve the desired effect of automatically presenting the Target Organization prominently within the context of the other organizations.

Implementing these changes will enhance your chart's readability and focus on the Target Organization while maintaining the broader context of the remaining data. For further mastery in DAX and visual best practices, consider exploring courses on the Enterprise DNA Platform to enrich your skills.

Create your Thread using our flexible tools, share it with friends and colleagues.

Your current query will become the main foundation for the thread, which you can expand with other tools presented on our platform. We will help you choose tools so that your thread is structured and logically built.

Description

This guide outlines how to enhance a chart in Power BI by automatically positioning and highlighting the NHS Bath and North East Somerset, Swindon and Wiltshire Integrated Care Board, ensuring it stands out alongside other organizations using modified DAX measures and visualization settings.