Don't miss your chance to take exam DP-600 or DP-700 on us!
Request nowLearn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now
hello
I need your help to create a measure and thus obtain the value of the accumulated average per week, this measure I have tried to create in many ways without any success. My tbla is configured as follows with the following measurements:
I leave Excel with TBLA data structure
Indicadores.xlsx sampling
The expected result
for week 44: 91.67)/1
for week 45: (91.67+ 92.40)/2
for week 46: (91.67+ 92.40+95.46)/3
and so on...
I thank you for all your support and experience, thank you!
Solved! Go to Solution.
Hi,
I tried to create a sample pbix file like below.
Please check the below picture and the attached pbix file.
One of ways to achieve this is to use WINDOW DAX function in the measure.
WINDOW function (DAX) - DAX | Microsoft Learn
expected result: =
VAR _t =
ADDCOLUMNS (
WINDOW (
1,
ABS,
0,
REL,
ALL ( 'calendar'[Year-Month], 'calendar'[Year-Month sort] ),
ORDERBY ( 'calendar'[Year-Month sort], ASC )
),
"#avgsalespermonth", [average sales per month:]
)
VAR _countrows =
COUNTROWS ( _t )
RETURN
IF (
NOT ISBLANK ( [average sales per month:] ),
SUMX ( _t, [#avgsalespermonth] ) / _countrows
)
Hi @Syndicate_Admin ,
I very much recognize Jihwan_Kim's idea, but I created a form just the same.
So I think you can create a calculated column and here is the DAX code.
Column =
VAR CurrentRow = 'Table'[Number]
RETURN
DIVIDE(
SUMX(
FILTER(
'Table',
'Table'[Number] <= CurrentRow
),
'Table'[Value]
),
CurrentRow
)
Best Regards
Yilong Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Syndicate_Admin ,
I very much recognize Jihwan_Kim's idea, but I created a form just the same.
So I think you can create a calculated column and here is the DAX code.
Column =
VAR CurrentRow = 'Table'[Number]
RETURN
DIVIDE(
SUMX(
FILTER(
'Table',
'Table'[Number] <= CurrentRow
),
'Table'[Value]
),
CurrentRow
)
Best Regards
Yilong Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi,
I tried to create a sample pbix file like below.
Please check the below picture and the attached pbix file.
One of ways to achieve this is to use WINDOW DAX function in the measure.
WINDOW function (DAX) - DAX | Microsoft Learn
expected result: =
VAR _t =
ADDCOLUMNS (
WINDOW (
1,
ABS,
0,
REL,
ALL ( 'calendar'[Year-Month], 'calendar'[Year-Month sort] ),
ORDERBY ( 'calendar'[Year-Month sort], ASC )
),
"#avgsalespermonth", [average sales per month:]
)
VAR _countrows =
COUNTROWS ( _t )
RETURN
IF (
NOT ISBLANK ( [average sales per month:] ),
SUMX ( _t, [#avgsalespermonth] ) / _countrows
)
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
Check out the February 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 50 | |
| 40 | |
| 37 | |
| 14 | |
| 14 |
| User | Count |
|---|---|
| 85 | |
| 69 | |
| 37 | |
| 29 | |
| 27 |