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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
sunil3M
New Member

cummulative sum

hi

 

how to create below calculation in Power in a new column.

 

 

Orderd qty =SUMIF($A$2:A2,A2,$B$2:B47)

 

SKU is column A , BACK QTY is column B and ordered qty is the result qty as per above formula in excel.

 

SKU #BACK QTYOrdered qty
IX11010067010001000
IX11010077910001000
IX11010067010002000
IX11010077910002000
IX11010067010003000
IX11010067010004000
IX11010067010005000
IX11010067010006000
IX11010067030009000
IX1101007792000022000
 
 

 

 

1 ACCEPTED SOLUTION
v-henryk-mstf
Community Support
Community Support

Hi @sunil3M ,

 

Try the following formual:

Order qty1 = 
SUMX (
    FILTER (
        'Table',
        [SKU #] = EARLIER ( [SKU #] )
            && [Index] <= EARLIER ( [Index] )
    ),
    [BACK QTY]
)

v-henryk-mstf_0-1614669804396.png


Best Regards,
Henry


If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

View solution in original post

2 REPLIES 2
v-henryk-mstf
Community Support
Community Support

Hi @sunil3M ,

 

Try the following formual:

Order qty1 = 
SUMX (
    FILTER (
        'Table',
        [SKU #] = EARLIER ( [SKU #] )
            && [Index] <= EARLIER ( [Index] )
    ),
    [BACK QTY]
)

v-henryk-mstf_0-1614669804396.png


Best Regards,
Henry


If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

amitchandak
Super User
Super User

@sunil3M , You need have date column. If not add an index column and try

 

Add an index column https://stackoverflow.com/questions/45715963/creating-an-index-column-for-power-bi

 

New column = sumx(filter(Table, [SKU #] =earlier([SKU #]) && [Index] <= earlier([Index])),[BACK QTY])

 

or new measure =
sumx(filter(allselected(Table), Table[SKU #] =max(Table[SKU #]) && Table[Index] <= max(Table[Index])),Table[BACK QTY])

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
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!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 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
Top Kudoed Authors