Skip to main content

Command Palette

Search for a command to run...

Power BI Practice: Using a Constant Line to Highlight Data in a Power BI Clustered Bar Chart

Published
1 min read
M

Mohamad's interest is in Programming (Mobile, Web, Database and Machine Learning). He is studying at the Center For Artificial Intelligence Technology (CAIT), Universiti Kebangsaan Malaysia (UKM).

Scenario:

You have a clustered bar chart that contains a measure named Salary as the value and a field named Employee as the axis. Salary is present in the data as numerical amount representing US dollars. You need to create a reference line to show which employees are above the median salary.

Solution: You create a constant line and set the value to .5. Does this meet the goal?

Answer: No, this solution does not meet the goal. Setting a constant line to 0.5 would not represent the median salary. Instead, you need to calculate the median salary and then create a reference line at that value.

Refer:

https://hashnotes.hashnode.dev/power-bi-practice-creating-a-median-salary-reference-line-in-power-bi-clustered-bar-chart

https://hashnotes.hashnode.dev/power-bi-practice-creating-a-median-salary-reference-line-in-power-bi-clustered-column-chart