Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
I have created a measure to calculate a monthly average for years 2018 and 2019 that I would like to visualize on the secondary axis to compare to monthly counts for more current years (2020-2024) but I don't want the bars for those years (2018-2019) included in the legend/visualized on the graph. However if I filter to exclude those years, my average line also disappears. I have tried to use ALL() and REMOVEFILTERS() on both the counts and the average measures but no dice. I'm sure someone here has a better idea! Thank you!
Solved! Go to Solution.
Hi, @akt
If you want not to display the values on the Line y-axis, you can turn off the display of data labels in visual >> Data label:
If the value you want to display is the value of your measure, rather than a specific month, try using the following DAX expression:
Average_2018_2019 =
CALCULATE(
AVERAGE(Table[Value]),
FILTER(
ALL(Table[Year]),
Table[Year] IN {2018, 2019}
)
)
If you don't want to display COUNT1819AVG in the legend, I haven't found any switch to turn off the line Y-axis in the legend. Here is a possible alternative:
Turn off the legend field in the original chart and use an independent legend visual, so that the COUNT1819AVG field is not displayed in the legend of the chart.
How to Get Your Question Answered Quickly
If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .
Best Regards
Jianpeng Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, @akt
If you want not to display the values on the Line y-axis, you can turn off the display of data labels in visual >> Data label:
If the value you want to display is the value of your measure, rather than a specific month, try using the following DAX expression:
Average_2018_2019 =
CALCULATE(
AVERAGE(Table[Value]),
FILTER(
ALL(Table[Year]),
Table[Year] IN {2018, 2019}
)
)
If you don't want to display COUNT1819AVG in the legend, I haven't found any switch to turn off the line Y-axis in the legend. Here is a possible alternative:
Turn off the legend field in the original chart and use an independent legend visual, so that the COUNT1819AVG field is not displayed in the legend of the chart.
How to Get Your Question Answered Quickly
If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .
Best Regards
Jianpeng Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
44 | |
25 | |
19 | |
16 | |
8 |
User | Count |
---|---|
70 | |
49 | |
45 | |
20 | |
16 |