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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Datanik
Frequent Visitor

average in the form of a line on the chart

I'm trying to show the average for the last 90 days as a straight line on the chart, but I only get a moving average. Do you have any ideas how this can be done in a straight line? I will be grateful for any help.

average 3 month =
VAR NumOfMonths = 90
VAR LastCurrentDate = MAX ( perf[Date] )
return
CALCULATE(AVERAGEX(perf,perf[clickk]), DATESINPERIOD (perf[Date], LastCurrentDate, - NumOfMonths, day ))
 
graf.png
1 ACCEPTED SOLUTION
Shaurya
Memorable Member
Memorable Member

Hi @Datanik,

 

Calculate average for the entire duration that you want and ignore any filter context in that measure. Then add a constant line in your visual from the Analytics Pane by using that measure.

 

Did I answer your question? Mark this post as a solution if I did!
Consider taking a look at my blog: Forecast Period - Previous Forecasts

View solution in original post

1 REPLY 1
Shaurya
Memorable Member
Memorable Member

Hi @Datanik,

 

Calculate average for the entire duration that you want and ignore any filter context in that measure. Then add a constant line in your visual from the Analytics Pane by using that measure.

 

Did I answer your question? Mark this post as a solution if I did!
Consider taking a look at my blog: Forecast Period - Previous Forecasts

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.