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
Prompt
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:
Opido1_ICB:
Opido1_ICB = CALCULATE( SUM(Fact_Opiod1_ICB[Patients receiving opioid pain medicines per 1,000 patients]), DatesCalendar[MonthnYear] )
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
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.
- Ensure your chart is set to sort by
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.
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.