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

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.

Reply
alexsandro
Frequent Visitor

create cumulative column undated and index measure

I need to create an accumulated column but, without using date. I created an index column via measure without using the power query because I need this accumulated to move if I change department or period. I tried to use this index, I tried to create a counter to maybe add to the previous value, but the Earlier function just doesn't work, nor does it recognize dimension columns.

 

my data is currently as follows.
I'm just using only one column the rest of the other columns are measured.

 

https://docs.google.com/spreadsheets/d/12Y79JzUmfviYkP2GZSclYMyBhnjUKdVu/edit?usp=sharing&ouid=11680...

alexsandro_0-1647611952108.png

 

1 ACCEPTED SOLUTION

Here is your dynamic cumulation

cumul = 
var s = sum(abc1[sumSalesRevenues])
var p = max(abc1[COD_PRODUCT])
var a = CALCULATETABLE(values(abc1[COD_PRODUCT]),REMOVEFILTERS(abc1[COD_PRODUCT]))
var b = ADDCOLUMNS(a,"sm",var p = [COD_PRODUCT] return calculate(sum(abc1[sumSalesRevenues]),abc1[COD_PRODUCT]=p))
var c = FILTER(b,[sm]>=s)
return  divide(sumx(c,[sm]),sumx(b,[sm]),0)

lbendlin_0-1648068940653.png

 

see attached pbix

View solution in original post

8 REPLIES 8
alexsandro
Frequent Visitor

I show you.

lbendlin
Super User
Super User

"I created an index column via measure "

 

How? And based on what? 

don't have column indice, I deleted. 
it is possible only with the data in the attachment?

I mean, you can do a RANKX based measure, but without any context I am hesitant to recommend any particular approach. Please provide a more detailed explanation of what you are aiming to achieve. What have you tried and where are you stuck?

I need to create an accumulated that is flexible according to the value of sales (measures).

 

I tried to create a dynamic index, but I couldn't

alexsandro_0-1647961602990.png

 

so I can create a dynamic abc curve.

my attachment below.

 

Link of project.
https://drive.google.com/file/d/1ZpHfXVKXqWspuhCwwYVPwm0rfdeGmfZr/view?usp=sharing

Here is your dynamic cumulation

cumul = 
var s = sum(abc1[sumSalesRevenues])
var p = max(abc1[COD_PRODUCT])
var a = CALCULATETABLE(values(abc1[COD_PRODUCT]),REMOVEFILTERS(abc1[COD_PRODUCT]))
var b = ADDCOLUMNS(a,"sm",var p = [COD_PRODUCT] return calculate(sum(abc1[sumSalesRevenues]),abc1[COD_PRODUCT]=p))
var c = FILTER(b,[sm]>=s)
return  divide(sumx(c,[sm]),sumx(b,[sm]),0)

lbendlin_0-1648068940653.png

 

see attached pbix

Thanks  Ibendlin, it's perfect!

 

based on values of sales.

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

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.