The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
I need to create a reference line for a bar chart in Power BI.
In tableau we can create a reference line by going into analytics.
and create the line in tha bar chart
But in powerBI only constant line is available.
How do I add reference line in bar chart of Power BI same as tableau one?
Help with this is appreciated. Thanks
To add a reference line to a bar chart in Power BI, you can follow these steps:
Create a bar chart with the desired fields.
Right-click on the chart and select "Format".
In the "Format" section, expand the "Data Labels" and select "Line".
In the "Line" section, you can adjust the line color, style, and thickness.
To add the reference value, you can either use a calculated field or a measure. For example, if you want to add a line at the average value of the data, you can create a measure using the following DAX formula:
= AVERAGE(Table[Field])
Where "Table" is the name of the data table and "Field" is the name of the field used in the chart.
Add the measure to the chart and adjust the position of the line in the "Line" section of the "Format" panel.
To display the reference value in the chart, you can add a data label to the line. Right-click on the line, select "Add Data Label", and adjust the label format and position as desired.
By following these steps, you can create a reference line in a bar chart in Power BI similar to Tableau.
Is this process still accurate? I don't see a "Line" in the Data Labels section of the format pane.
If I use the "Reference Line" section ther are no options/properties/settings that allow me to adjust the thickness.
is there any solution on this?
As @asdf1608 mentioned, there is no option "line" under "data labels"...
In the new visualization pane there is an option for reference lines. But what I am missing here is how to adjust the thickness of the line. Is this really missing on purpose? This has to be an error, because everywhere else I am able to control the thickness of a line...
User | Count |
---|---|
74 | |
70 | |
39 | |
30 | |
28 |
User | Count |
---|---|
104 | |
95 | |
51 | |
48 | |
46 |