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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
sean111
Frequent Visitor

Calculating Change in Units on a day to day basis

I have a table with the following headers; Company Code, Holder ID, Units, Date

 

This table receives ingestions on a daily basis and includes a snapshot of the holders of shares of a company. So on a particular day (1/5/23), Holder X will hold 10 shares of Company A. 

Company Code, Holder ID, Units, Date

A, X, 10, 1/5/23

 

I am trying to add another column to this named Change in Units. When there is a change in the number of units held of a company by an investor from the previous day, I want to record the change in the number of units

 

For example:

Company Code, Holder ID, Units, Date, Change in Units

A, X, 10, 1/5/23, null

A, X, 10, 2/5/23, null

A, X, 11, 3/5/23, 1

A, X, 10, 4/5/23, -1

 

On an additional note, when a holder sells all of their holdings, they will not be included in the next snapshot of the holders of the company. I need to indentify when this occurs and create a new row to include the change in the units for the given date. 

2 REPLIES 2
lbendlin
Super User
Super User

Please provide sample data that covers your issue or question completely.
https://community.powerbi.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-...
Please show the expected outcome based on the sample data you provided.

https://community.powerbi.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523

I've attached the link to the sample data here https://docs.google.com/spreadsheets/d/1yRypaXtaQ9lqeLBQQhrdGaszis0dvS3XrQFDsbm-BLE/edit?usp=sharing 

 

Ideally, I am looking for a new table which only shows the trade dates and change in units. 

 

Another note, is that the data is only received for weekdays, nothing is received for weekends

 

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.