Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hi All,
I have a table which has created on date and membership ID. I would like to calculate the average number of member joined in the last 30 days. Any help on this would be greatly appriciated.
Solved! Go to Solution.
hi @biswad
Thank you all for trying to help me on this problem. There are lot of things to take on, much appriciated everyone's effort.
Hi @biswad
I'm not sure how actual data really is but given the sample data, please try these:
30 Days Moving Average =
VAR _Value =
CALCULATE (
SUM ( 'Table'[value] ),
DATESINPERIOD ( 'Table'[Date], MAX ( 'Table'[Date] ), -30, DAY )
)
VAR _Count =
CALCULATE (
DISTINCTCOUNT ( 'Table'[Date] ),
DATESINPERIOD ( 'Table'[Date], MAX ( 'Table'[Date] ), -30, DAY )
)
RETURN
DIVIDE ( _Value, _Count )
30 Days Moving Average 2 =
VAR _Value =
CALCULATE (
SUM ( 'Table'[value] ),
DATESINPERIOD ( 'Table'[Date], MAX ( 'Table'[Date] ), -30, DAY )
)
RETURN
DIVIDE ( _Value, 30)
30 Days Moving Average 3 =
CALCULATE (
AVERAGEX (
ADDCOLUMNS (
SUMMARIZE ( 'Table', 'Table'[Date] ),
"@value", CALCULATE ( SUM ( 'Table'[value] ) )
),
[@value]
),
DATESINPERIOD ( 'Table'[Date], MAX ( 'Table'[Date] ), -30, DAY )
)
Please see attached sample pbix.
hi @biswad
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
Check out the November 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 59 | |
| 46 | |
| 42 | |
| 23 | |
| 17 |
| User | Count |
|---|---|
| 190 | |
| 122 | |
| 96 | |
| 66 | |
| 47 |