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
SofiaD
Regular Visitor

Last Month End = This Month Beginning

Hi Everyone!

 

Can anyone assist with this?

Looking to find a way to get last month ending numbers per salesperson 

as this month's beginning numbers in Power Query Editor

 

Jan begining numbers come from a customer list (table 1)

Then monthly we add/lose customers (from an addition table (table 2) and a lost table(table 3))

Ending numbers in Jan become Feb starting numbers

Again add/lose customer (table 2 & 3 again)

Feb ending becomes Mar starting and so on

 

Ex.

DateSalespersonBeg Customer CountAdded CustomerLost CustomersEnding Customers
1/1/2018A51-24
1/1/2018B62-26
1/1/2018C43-16
2/1/2018A43-16
2/1/2018B61-43
2/1/2018C62-17
3/1/2018A65-38
3/1/2018B32-14
3/1/2018C72-36


Any idea how I can achieve this?

 

Thanks in advance!!

1 ACCEPTED SOLUTION
v-chuncz-msft
Community Support
Community Support

@SofiaD,

 

You may take a look at https://community.powerbi.com/t5/Desktop/M-Function-calculate-running-total/td-p/358212.

Community Support Team _ Sam Zha
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

1 REPLY 1
v-chuncz-msft
Community Support
Community Support

@SofiaD,

 

You may take a look at https://community.powerbi.com/t5/Desktop/M-Function-calculate-running-total/td-p/358212.

Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.