Forum Discussion
Rickstor
3 years agoFrequent Visitor
Moving Average 5 periods
Hello. Please help me. I need a moving average, 5 periods, in Power BI, using a measure. This is so easy in Microsoft Excel. I need this: The column 'year' has a text format. After se...
- 3 years ago
pls try this
5 step 3 = VAR _CurentRx = MAX('data'[Rx]) VAR _Results = CALCULATE(SUM(data[value]), FILTER(ALL(data),'data'[Rx]<=_CurentRx&&'data'[Rx]>=_CurentRx-4), VALUES(data[cod_region])) /5 RETURN IF(_CurentRx< 6 , BLANK(),_Results)
Ashish_Mathur
Super User
3 years agoHi,
What do the numbers in the SE column represent? Are they week numbers? If yes, then if you have a Calendar Table with week numbers as well, there is a fairly straight forward solution.
- Rickstor3 years agoFrequent Visitor
Yes, they are week numbers. Like this:
It's a epidemiological calendar.
Maybe can I use the column "End", using relationship between column 'SE' and my other dataset?- Rickstor3 years agoFrequent Visitor
my previous post, that is a problem, I don't have the epidemiological calendar from years 2022 and 2021. In my project, I only need 2023 calendar.
- Ashish_Mathur3 years ago
Super User
Hi,
Share the download link of the MS Excel file.
- Rickstor3 years agoFrequent Visitor
Hi. It's here (but in .pdf file):
SINANWEB - Calendário Epidemiológico (saude.gov.br)