- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

Cumulative average per day in power bi
Please ask, I want to make a table to find the cumulative average tonnage based on date and month in Power BI, like the following picture:
and this is the dax formula I can't get:
Release Average = CALCULATE(
AVERAGE(DataRelease[TONAGE]),
DataRelease[Date] = EARLIER(DataRelease[Date]))
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

Hi @Bambang_Sono ,
Thanks for ryan_mayu and bhanu_gautam reply.
You can also try the follwing code to create a calculate column
Avg per days =
VAR CurrentDate = 'Table'[Date]
VAR CurrentMonth = 'Table'[Month]
VAR CurrentTonase = 'Table'[Tonase]
VAR DaysUntilCurrentDate = COUNTROWS(FILTER('Table', 'Table'[Month] = CurrentMonth && 'Table'[Date] <= CurrentDate))
VAR CumulativeTonase =
CALCULATE(
SUM('Table'[Tonase]),
FILTER(
'Table',
'Table'[Month] = CurrentMonth &&
'Table'[Date] <= CurrentDate
)
)
RETURN
CumulativeTonase / DaysUntilCurrentDate
Final output
Best regards,
Albert He
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

Hi @Bambang_Sono ,
Thanks for ryan_mayu and bhanu_gautam reply.
You can also try the follwing code to create a calculate column
Avg per days =
VAR CurrentDate = 'Table'[Date]
VAR CurrentMonth = 'Table'[Month]
VAR CurrentTonase = 'Table'[Tonase]
VAR DaysUntilCurrentDate = COUNTROWS(FILTER('Table', 'Table'[Month] = CurrentMonth && 'Table'[Date] <= CurrentDate))
VAR CumulativeTonase =
CALCULATE(
SUM('Table'[Tonase]),
FILTER(
'Table',
'Table'[Month] = CurrentMonth &&
'Table'[Date] <= CurrentDate
)
)
RETURN
CumulativeTonase / DaysUntilCurrentDate
Final output
Best regards,
Albert He
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

you can try this
pls see the attachment below
Did I answer your question? Mark my post as a solution!
Proud to be a Super User!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

@Bambang_Sono , Try using
DAX
Release Average =
VAR CurrentDate = DataRelease[Date]
RETURN
CALCULATE(
AVERAGE(DataRelease[TONAGE]),
FILTER(
ALL(DataRelease),
DataRelease[Date] <= CurrentDate
)
)
Proud to be a Super User! |
|
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

What if it's combined with the summarize function?
example of my dax formula:
Average Release =
VAR CurrentDate = DataRelease[Date].[Date]
RETURN
CALCULATE(
AVERAGEX(DataRelease[TONAGE]),
SUMMARIZE(
FILTER(
ALL(DataRelease),DataRelease[Date].[Date] <= CurrentDate)
)

Helpful resources
Join us at the Microsoft Fabric Community Conference
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Power BI Monthly Update - February 2025
Check out the February 2025 Power BI update to learn about new features.

User | Count |
---|---|
87 | |
81 | |
53 | |
38 | |
35 |