Moving media for beginner

Hello,

How to create a graph to calculate the moving average for:

  1. weekly
  2. biweekly
  3. monthly?

I have never created it before. :frowning:

Thanks.
July

Hi @July
you can use

to calculate the avg in general.
And use

To use the week or month part of the date within the sort attribute.
Please let me now it worked.
BR

2 Likes

Hi @July,

has @ErikG 's references worked for you? I am marking this reply as, “Solution,” but let us know if this is not resolved. Thanks for posting your questions on the Quick Sight Community Q&A Forum!

GL

1 Like

Hello @gillepa

I did not have time to try it, but i think the references is OK.
I let you know if I will have any difficult.

Thank you so much.

Hello,

It is not working:

windowAvg
(
sumOver(distinct_countIf({id_customer}, {step} = ‘E’)),
truncDate(‘MM’, {my_date}),
0, → i did not understand the start and end
0
)

I have data from October, November and December, but I need this to be automatic so that when I have subsequent months, my moving average needs to work. How can I make this adjustment?

did you try something like

windowAvg
(
sumOver(distinct_countIf({id_customer}, {step} = ‘E’)),
truncDate(‘MM’, {my_date}),
1,
3
)

whats the outcome?

It worked with sumif.
Thank you