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.
Is there a way to include the average line (or any of the dynamic reference lines) into the visual's legend?
@JRocas, what type of chart are you using? One potential option could be to create a measure for the average (or whatever other reference you are looking for) and then graph that in your chart alongside your other measures. That would then add the reference to the legend.
This would likely only work for line charts or for bar charts (if you change to combo chart and put the average measure as the line).
I'm using a line chart. Thanks for your input. However (this comment is more directed to Power BI developers), having to create a measure for the average in order for it to show in the legend takes away from the convenience of using dynamic reference lines. Convenience is especially relevant for users like myself who don't have a developer/coding background to build measures on the fly.
In Power BI Dekstop, the line chart can't generate dynamic average lines automatically. @Anonymous is correct. In a line chart, one line means a field, so to include average line, you have to create average field in your dataset (either calculated column or measure). And it can't be a dynamic aggregation type. You need to define it in your formula. To create an average measure, please refer to formula below:
Average Amount = CALCULATE(AVERAGE(Table1[Amount]),ALL(Table1))
Regards,
In current versions, its not possible.
User | Count |
---|---|
80 | |
73 | |
39 | |
30 | |
28 |
User | Count |
---|---|
107 | |
99 | |
55 | |
49 | |
46 |