Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

Reply
Ram_DCT
Helper II
Helper II

Cumulative sum of a column by rows and should be filtered by dimensions

Hi Team,

 

I am looking for a cumulative sum of a column in my dataset using calcuated COLUMN only as I need to use that column in Table Visual for a specific use. Below is the sample data where I have given on how I want my output.

 

Original Data With Cumulative sum in column named as cumulative [I am getting this cumulative correct when I am not filtering my data with any dimensions I have]

ReportIDReport NameCountCumulativeCategoryFrequency
1001Report 111Category1D
1002Report 312Category1M
1003Report 513Category1D
1004Report 714Category2M
1005Report 915Category2W
1006Report 1116Category2D
1007Report 1317Category3M
1008Report 1518Category3M
1009Report 1719Category3D
1010Report 19110Category3M
1011Report 21111Category3M
1012Report 23112Category4D
1013Report 25113Category4D

 

What I need is whenever I filter my above table - my cumulative sum should start from that point - for example - If filter category 4 and Frequency D - below is should be the expected result with culculated column

ReportIDReport NameCountCumulativeCategoryFrequency
1012Report 2311Category4D
1013Report 2512Category4D

 

I am getting my result correct using a measure but not using a calcuated column when I aplpy filters on the dataset I have.

 

Appreciate your quick help here!!

 

Thanks,

Ram

7 REPLIES 7
V-pazhen-msft
Community Support
Community Support

@Ram_DCT 

Unfortunately, calculate column cannot be dynamic. and measure is dynamically changing based on interactions. That is one of the basically differences between them.

 

 

Best Regards
Paul Zheng _ Community Support Team

Fowmy
Super User
Super User

@Ram_DCT 

That is correct, when you create a calculated column, that gets added to your table and it is not recalculated when you use them on the reports with slicers and filter. The measures on the other hand will react to filter context and perform calculations based on the current context.

 

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

However, I need to have a calculated column which will behave just like a measure when sliced and diced.

 

-Ram

@Ram_DCT 

Unfortunately, it is not possible. You can create a measure to achieve this.

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

Can I use RANKX to get dynamic ranking column besed on the cumulative sum of the caluclated column?

 

@Ram_DCT 

You can create this measure:

Rank = 
RANKX( ALLSELECTED(Table) , CALCULATE(SUM(Table[Cumulative])),,ASC) 
Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

I am so sorry to be rigid here but I need to have column only. Any other option to achieve this?

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

Check out the February 2025 Power BI update to learn about new features.

Feb2025 NL Carousel

Fabric Community Update - February 2025

Find out what's new and trending in the Fabric community.