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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
desiiirz
Regular Visitor

Cumulative Sales

Hello,

 

I want a new column that calculate the cumulative sales A.K.A (nombre de rdv créés) 

 

I come up with the formula below but it calculate me the cumulative sales for each S01, S02, S03 ect...

EFCEZFZEFFEZ.PNG

My ideal result looks like this : 

 

Column A                

Line 1 : 20                

Line 2 :  50

Line 3 : 10

 

Column running total : 

Line 1 : 20                

Line 2 :  70

Line 3 : 80

 

and so on

6 REPLIES 6
v-xinruzhu-msft
Community Support
Community Support

Hi @desiiirz 

You can add an index column in power query

vxinruzhumsft_0-1675129191362.png

Then create a new column in table.

Running toal = CALCULATE(SUM(RegN[Nombre de ]),FILTER(RegN,[Index]<=EARLIER(RegN[Index])))

Output

vxinruzhumsft_1-1675129360162.png

 

Best Regards!

Yolo Zhu

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

 

FreemanZ
Super User
Super User

hi @desiiirz 

do you have other columns with unique value on each row?

@FreemanZ  hi, 

 

there is no unique value beside "nombre de rdv créées" where there is a lot of 0 value.

Right now, it calcule the cumulative sales for each S01 then S02 ect...

hi @desiiirz 

could you paste your data as text?

@FreemanZ Yes, column/mois is already in text 

hi @desiiirz 

i mean to paste your sample data as text, so we could copy to Excel/PBI to get the solution for you, instead a screenshot. 

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.