Forum Discussion
Custom Reference Line Using DAX
- Anonymous1 year ago
Hi mdm2025,
since the combo chart isn’t fitting your visual needs, and you are trying to show a separate custom line for each column using a measure, your current workaround with an extra column makes sense for now.
At the moment, Power BI doesn’t have a built-in way to draw individual lines on each bar using a measure. That’s why people usually go for the combo chart method, even though it has its own limitations.
Hope this helps if you have any queries we are happy to assist you further.
Best Regards,
Harshitha.
Hi mdm2025
You will need to create a measure similar to the below, I am setting different targets for different days of the week.
Custom Reference Line =
SWITCH(
SELECTEDVALUE('Date'[Day Name]),
"Monday", 1500,
"Tuesday", 1300,
"Wednesday", 500,
"Thursday", 1200,
"Friday", 900,
"Saturday", 800,
"Sunday", 700,
BLANK()
)
Add that as the line y-axis in a line and clustered column chart for the following result
You could also add it as a tooltip for better visibility
I hope this helps! Please give a thumbs up and mark as solved if it does, thanks!