March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
Hi,
I have a simple data set that I need to show an average for as a line over a bar graph. I have about 8 years of data with only two columns Date and Appointment Type. I have created a basic column visual that lets me see how many of each appointment type we have completed in each day, month etc.
I would like to have a calculation that sits over the top that shows what the average in that time period has been for that particular set of filtered appointment types and time period. So for example if I am looking at the last 12 months I would like to see what the average number of that appointment type has been over that past 8 years for each month to see how we are performing. If I am looking at the quarter again have it automatically change to show the average for the QTR.
Thanks in advance for the advice.
HI @cooke01,
According to your description, you want to create dynamic average line of current selected date range, right?
If this is a case, you can try to use below measure to calculate the dynamic average:
Dynamic Average= IF(ISBLANK(MAX(Table[Date]))=FALSE(),CALCULATE(AVERAGE(Table[Amount]),ALLSELECTED('Table')))
Regards,
Xiaoxin Sheng
Hi,
Probably the easiest way to do this is to use the 'Analytics' feature on the bar graph. Underneath the various visualisations, in the same area where you put the data types into a visual, there should be magnifying glass with a line chart within it (select your bar graph first!).
This will then give you options to add various lines, including an average line, which will automatically filter to show the average of the data in the bar chart, as filtered by any slicers on the data.
Hope this helps!
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
134 | |
91 | |
90 | |
64 | |
58 |
User | Count |
---|---|
201 | |
137 | |
107 | |
72 | |
68 |