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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Deleted/Added Records from previous dataset

Pros, apparently a simple scenerio but didn't find any source. 

 

I populate a table with a dataset I get every month. I need two measure which calculate newly added and newly deleted records. 

what I mean is that a record did exist in previous month but now it does not; and similarly added were the onese found for the first time in the current dataset. Notice that ID 10 does not exist in February as well as March, however February should be the only month where it should be counted.

Capture.PNG

2 REPLIES 2
justinh
Advocate IV
Advocate IV

Use Merge As New, but choose which merge type. You'll have to do it twice to get the two seperate tables you want. If Table 1 was your old table and Table 2 is your new table, you'll want to choose something like "Rows Only in First Table" to get the deleted rows and "Rows Only In Second Table" to get the newly added rows. 

lbendlin
Super User
Super User

Use the EXCEPT() DAX function

 

Let's say a is the current snapshot and b the previous one.

EXCEPT(a,b)  will give you all the rows that are in a but not in b (ie additions), EXCEPT(b,a) will give you all rows that are in B but not in a (ie deletions)

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

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.

Top Solution Authors
Top Kudoed Authors