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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
Anonymous
Not applicable

Need to find the % based on Cumulative total Column

Hi Guys,

I have table as below, I need to calculate Cumulative Total for each Type for Columns "FNet" and "FLevel" but as a calulcative Columns and not as measure. Since i need to add these columns as Slicer. 

I have created a Measure, but i need to convert the same as Calculative Columns,

Cumulative = CALCULATE(SUM('Table'[FNet]), FILTER( ALLSELECTED('Table'[Valid From]), ISONORAFTER('Table'[Valid From], MAX('Table'[Valid From]), DESC))

 

Please Help me to get the same Calculation in Calculative Column.., 

TypeValid From FNetFLevel
Base1/10/202010020
Base1/17/202020030
Base1/24/2020500
Skip1/10/20200100
Skip1/17/20205000
16 REPLIES 16
amitchandak
Super User
Super User

Make sure you have a date table and join it with your table. And try like this example

Cumm Sales = CALCULATE(SUM(Sales[Sales Amount]),filter(date,date[date] <=maxx(date,date[date])))

% of GT

Cumm Sales = CALCULATE(SUM(Sales[Sales Amount]),filter(date,date[date] <=maxx(date,date[date])))/SUMX(all(Sales),Sales[Sales Amount]),

 In case you are looking for sub total or % of sub total refer

https://community.powerbi.com/t5/Desktop/Percentage-of-subtotal/td-p/95390

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

@amitchandak Thanks for your reply. Based on the formula which you provided, i created the Cumulative Column for "FNet" and it works perfectly but if i try the same formula for "FLevel" i am getting the error as "Circular dependency"

 

Column 1 = CALCULATE(SUM(Table[FNet]),filter('Date','Date'[date] <=maxx('Date','Date'[date])))
Column 2 = CALCULATE(SUM(Table[FLevel]),filter('Date','Date'[date] <=maxx('Date','Date'[date])))
 
% should be calculated based on Column 2/Column 1 - I believe if Column 2 is sorted out the % can be calculated easily.

Both of them should be measures. Do you need a column?

A column will like below, But you can not use measure in that

Cumm column = sumx(filter(table,table[Valid From]<=earlier(table[Valid From])),table[FLevel])

 

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

@amitchandak i am getting Syntax error " highlited below". 

I need both FNet and FLevel as COLUMN which shows Cumulative Value. When i try to create it as column for both FNet and FLevel it shows as Circular Dependency.

 

Column 1 = sumx(filter('Table','Table'[Date]<=earlier('Table'[Date])),WMAP[FNet])

Assuming WMAP is your table. It should be like. Are we taking of 1 table or 2 tables

Column in WMAP = sumx(filter(WMAP,WMAP[Date]<=earlier(WMAP[Date])),WMAP[FNet])
Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

@amitchandak Only 1 Table Called wmap.., Below formula is not workly properly ( I mean the result is incorrect) where as the measure formula which you provided is working perfectly. But the Need is to create a Column and not measure.

 

 

 

Column in WMAP = sumx(filter(WMAP,WMAP[Date]<=earlier(WMAP[Date])),WMAP[FNet])

 

 

 

If possible please share a sample pbix file after removing sensitive information.Thanks.

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

@amitchandak Sorry for silly question,  iam unable to upload pbix file. I dont have any options to attach file. May i know how to do it./?

drop box, one drive, share link

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

@amitchandak I Created a Test file.., Created two measures as Cumulative FNet, Cumulative Flevel and divided both columns..,

Now I need to those two measures "Cumulative FNet and Cumulative Flevel as a Column so that i can use it as Filters.

 

https://drive.google.com/drive/folders/1Fh9MHjmCrxT1e2BegSndCSgEcT0LeAt8?usp=sharing

The formulas are working. But there are nonunique dates you need to add an index column. I can not add as edit query will look for source. Refer :https://yodalearning.com/tutorials/learn-how-create-index-columns-using-power-query/

Please find formula with and without index columns

Cumm Flevel = sumx(filter('Table','Table'[Valid From]<=EARLIER('Table'[Valid From])),'Table'[Flevel])
Cumm FNet = sumx(filter('Table','Table'[Valid From]<=EARLIER('Table'[Valid From])),'Table'[Fnet])


Cumm Flevel = sumx(filter('Table','Table'[Valid From]<=EARLIER('Table'[Valid From]) && 'Table'[index]<=EARLIER('Table'[index])),'Table'[Flevel])
Cumm FNet = sumx(filter('Table','Table'[Valid From]<=EARLIER('Table'[Valid From])  && 'Table'[index]<=EARLIER('Table'[index])),'Table'[Fnet])

 

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

@amitchandak Sorry i am not getting the correct result with the formula without index. (Attached the file for your reference along with correct result. Not sure where iam making mistake..,.  I also attached the test source file for your reference, Please help.

Also i tried with Index, but it takes huge time and not working at the end with test file.

 

https://drive.google.com/drive/folders/1Fh9MHjmCrxT1e2BegSndCSgEcT0LeAt8

Anonymous
Not applicable

@amitchandak any help please, awaiting for your reply.., I incorporated the formula and it shows incorrect data.., 1st two Column Value is Correct (based on Measure, but i dont need measure) where as last two Column values are incorrect.Capture.JPG

 

ly.

@Anonymous ,

I will try in the next few hours and get back to you. Thanks for the reminder

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

@amitchandak any update on this?

 

@v-gizhi-msft 

I used the quick measure option and created a running total. Check if it helps

 

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors