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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Raj007
Helper III
Helper III

avg line in bar graph but the it should be based on some other measure (not the one in visual)

Hi All,

Thanks for your time. I have gone through some search but could not find..

Is it possible to get the average line in the bar graph say clustered bar graph ...say for example i have year in axis

2019 2020 2021 2022 and the measure is count of ticket numbers.. i want to get the average of last 3 only ( i do not want to include the 2022 in it)...could not find anything in my search,,,

any help is highly appreciated

1 ACCEPTED SOLUTION
v-kkf-msft
Community Support
Community Support

Hi @Raj007 ,

 

Please create the measure and then add a constant line (You may need an updated version of Desktop to add constant lines).

 

Ave = 
AVERAGEX (
    TOPN ( 3, VALUES ( 'Table'[Year] ), CALCULATE ( MAX ( 'Table'[Year] ) ), ASC ),
    [SumTickets]
)

vkkfmsft_0-1653374615075.png

 

If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
Winniz
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
v-kkf-msft
Community Support
Community Support

Hi @Raj007 ,

 

Please create the measure and then add a constant line (You may need an updated version of Desktop to add constant lines).

 

Ave = 
AVERAGEX (
    TOPN ( 3, VALUES ( 'Table'[Year] ), CALCULATE ( MAX ( 'Table'[Year] ) ), ASC ),
    [SumTickets]
)

vkkfmsft_0-1653374615075.png

 

If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
Winniz
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Raj007
Helper III
Helper III

i have may 2020 version...is this the reason why iam not able to see the options?

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors