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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
carollyna205
Frequent Visitor

Calculating Removed Users based on previous month totals

carollyna205_0-1689685567867.png

I have table like this, I want to create column removed users which will calculate how many users have been removed in new month, so for example firs one will be: Count of Users (from January) + Count of New Users (from February) - Count of Users (February) = removed users in February 

 

I have tried this: RemovedUsers = CALCULATETABLE((('Dashboard_data_2023'[GPN DCOUNT]),DATESMTD(dateadd('Dashboard_data_2023'[WEEK],-1,MONTH)))+'Dashboard_data_2023'[Count of GPN for NEW]-CALCULATE(('Dashboard_data_2023'[GPN DCOUNT]),DATESMTD('Dashboard_data_2023'[WEEK])))

but it creating column with the same values as column Count of New Users

2 REPLIES 2
lbendlin
Super User
Super User

According to your sample data "Count of Users" is the sum of "Count of Continue Users" and "Count of New Users". That means your formula

Count of Users (from January) + Count of New Users (from February) - Count of Users (February) 

can be rewritten as 

Count of Users (from January) - Count of Continue Users (February) 

 

Next you need an index column (or at least convert your date text into a proper date).  That will then allow you to do the calculation.  You can decide if this should be a measure, a calculated column, or a Power Query code.

It can not be rewritten this way and the total will show me sum of new and removed user. and I need only removed user

I know what logic I need, what I am looking for here is how to write dax for it as I need to do this automatically for every new month which will show there not manually doing calculations for each month 

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

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