Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi Everyone,
I have average measure and I want to show bar chart with average by year and drill down to month.
while showing in month I want values like cumulative.
For example, Jan = Jan, Feb= Jan + Feb like this.
Measure: calculate ([average measure], filter(all(dim_date), dim_date <= max(dim_date).
as per above measure I m getting sum by month but not cumulative value.
Solved! Go to Solution.
Hi @krishb1414 ,
Based on my testing again, please try the following methods again:
1.Create the sample table.
2.Create the new measure to calculate the month average.
Month average = AVERAGEX('Table date', 'Table date'[Values])
3.Create the new measure to cumulative sum average.
Cumulative sum month =
var sel_year = SELECTEDVALUE('Table date'[Year])
var sel_month = SELECTEDVALUE('Table date'[Month])
VAR _vtable = SUMMARIZE(ALLSELECTED('Table date'), 'Table date'[Year], 'Table date'[Month], "_Sum", [Month average])
VAR _vtable2 = ADDCOLUMNS(_vtable, "_Less", SUMX(FILTER(_vtable,[Month] <= sel_month && [Year] = sel_year), [_Sum]))
RETURN
SUMX(FILTER(_vtable2, [Month] = MAX('Table date'[Month]) && [Year] = MAX('Table date'[Year])), [_Less])
4.Drag the measures into the bar chart. Set the Date column to show year and month.
5.The result is shown below.
Best Regards,
Wisdom Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @krishb1414 ,
Based on my testing again, please try the following methods again:
1.Create the sample table.
2.Create the new measure to calculate the month average.
Month average = AVERAGEX('Table date', 'Table date'[Values])
3.Create the new measure to cumulative sum average.
Cumulative sum month =
var sel_year = SELECTEDVALUE('Table date'[Year])
var sel_month = SELECTEDVALUE('Table date'[Month])
VAR _vtable = SUMMARIZE(ALLSELECTED('Table date'), 'Table date'[Year], 'Table date'[Month], "_Sum", [Month average])
VAR _vtable2 = ADDCOLUMNS(_vtable, "_Less", SUMX(FILTER(_vtable,[Month] <= sel_month && [Year] = sel_year), [_Sum]))
RETURN
SUMX(FILTER(_vtable2, [Month] = MAX('Table date'[Month]) && [Year] = MAX('Table date'[Year])), [_Less])
4.Drag the measures into the bar chart. Set the Date column to show year and month.
5.The result is shown below.
Best Regards,
Wisdom Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
20 | |
7 | |
6 | |
5 | |
5 |
User | Count |
---|---|
26 | |
10 | |
10 | |
9 | |
6 |