Forum Discussion
Calculate an repeating average value to create a linear average line
Tobias106 , It should be like
CALCULATE(AVERAGEX('tableA', 'tableA'[Value]), ALLSELECTED(calendar) )
or
CALCULATE(AVERAGEX(values('Date'[Date]),calculate(sum( 'tableA'[Value])) ), ALLSELECTED(calendar) )
If this does not help
Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.
- Tobias1064 years agoHelper I
amitchandak Thank you 🙂
Your second measure shows me the same average value (35) for every date, which is very good.
But I have a measure (measureA) in the calender, which determines the date until the last calender week. In the Filter panel I excluded additionally - by using measureA in the filter panel - the dates before 2021.
Now, with your solution I have the 35, but I have also all Dates from my calender after the last full calender weak (the filter date < -2021 in the filter panel still works) . Therefore, the measureA ist not any more active if I use "ALLSELECTED(calendar)" at the end.
I hope I you can understand what I mean :D. Sincerely, I cannot upload data from company-account.
- Anonymous3 years agoNot applicable
Hi Tobias106,
Can you please share a pbix or some dummy data that keep the raw data structure with expected results? It should help us clarify your scenario and test to coding formula.
How to Get Your Question Answered Quickly
Regards,
Xiaoxin Sheng