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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
DEA
Frequent Visitor

Change in shares

Hi, 

new to this ... 

I have a dataset with portfolio data at multiple dates.

My columns are dates, security ID and Shares.

I want a visual in which the user could select a time period (via a slicer with the date field in it) and gets the change in shares between the beginning and end date.

For example, if the user selects a time period of the past 7 days and the portfolio had 10 shares of xyz at the beginning of period and 50 shares of xyz at the end of period, i want the user to see a table that shows XYZ and 40 shares (50-10).

 

I am not sure how to organise my data to set this up in an efficient manner.  

 

4 REPLIES 4
mussaenda
Super User
Super User

hi @DEA 

Please provide a sample data and your desired output to help you easier.

Thank you!

sturlaws
Resident Rockstar
Resident Rockstar

Hi, @DEA 

if you include a (scrubbed) sample of you data, it will be easier to help you.

 

What you can do to solve your case, is to create a stand alone table with the actual periods you want available. In the .pbix-file in the link,  I created Last 7 days and Last 14 days. The calculation is performed depending on which of these are selected, based on todays date. This works as long as you have data for every day. If you have gaps in your data, the solution would have to be more complex.

 

 

.pbix file
excel mockup input

DEA
Frequent Visitor

Not sure how to attach the data ... i pasted sample data below

I want the user to select a date range (for example 08/26/2019 to 08/27/2019)

and the user would receive the list of IDs for which the # of shares changed (for example, with the sample data below, the user would see a table:

 

thanks for your help. 

 

ID Change in Shares

1 30000000

 

Date class ID shares price ai weight Duration MV
2019-08-27 bench1 1 190073581 94 0.08 0.10 21.3 178,821,225
2019-08-27 bench1 2 168394639 91 1.89 0.09 16.7 156,421,780 
2019-08-26 bench1 1 220073581 94 0.08 0.12 11.2 207,045,225
2019-08-26 bench1 2 168394639 91 1.89 0.09 13.7 156,421,780

Hi @DEA ,

 

Use a slicer for your dates and set it as between

2019_09_01_11_08_41_Accounts_Receivable_Aging_Power_BI_Desktop.png

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.