Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Next up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now

Reply
Anonymous
Not applicable

Individual Average Line in Bar Chart

We have Data Like

Month || This Year Count || Last Year Count

Jan       || 10                      || 5

Feb      ||  15                     || 10

Mar     || 20                       || 15

 

We need a bar chart with Month on X-axis and Counts(This Year Count,Last Year Count) on the Y axis.

Now,We need to plot a average line on 45/3=15(This Year Count Average) and another line on 30/3=10(Last Year Count Average)

I would appreciate some help to develop this visual.

1 ACCEPTED SOLUTION

@Anonymous 

please see the attachment below





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




View solution in original post

8 REPLIES 8
Ashish_Mathur
Super User
Super User

Hi,

Are This Year Count and Last Year Count actual measures that you have written or are they input data columns available in your base data file?


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
Anonymous
Not applicable

Hi @Ashish_Mathur  Thanks for your reply.

We are using the Measures for Last and Current Year.
Thanks.

Hi,

Do these measures work?

Average = averagex(all(calendar[Month name]),[This year count])

Average1 = averagex(all(calendar[Month name]),[Last year count])

Hope this helps.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
ryan_mayu
Super User
Super User

@Anonymous 

please see the attachment below. hope it is helpful.





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Anonymous
Not applicable

Thanks @ryan_mayu  for your Reply.
We have tried the Measure and it is working fine.but when we select the month with the slicer, the average line is not affected.
The Requirement we got is to change the average line according to the filter selected.
Thanks

@Anonymous 

please see the attachment below





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Anonymous
Not applicable

Thanks @ryan_mayu 

you are welcome





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

FabCon and SQLCon Highlights Carousel

FabCon &SQLCon Highlights

Experience the highlights from FabCon & SQLCon, available live and on-demand starting April 14th.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.