Forum Discussion
sunil3M
5 years agoNew 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 pe...
- 5 years ago
Hi sunil3M ,
Try the following formual:
Order qty1 = SUMX ( FILTER ( 'Table', [SKU #] = EARLIER ( [SKU #] ) && [Index] <= EARLIER ( [Index] ) ), [BACK QTY] )
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
5 years agoSuper 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])