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 September 15. Request your voucher.

Reply
Paulo84
Frequent Visitor

Line graph portfolio value over time

Hi Folks, 

 

I am working with a simple table 'Unit Prices' with 3 columns:

 

* Date

* Investment Name

* Unit Price

 

I am trying to show the change in value over time (line graph) of an initial investment of $10,000 (with no subsequent investments afterward). I have a slicer by date range as well as a linked date table. 

 

Calculating the value of the investment at any point in time is done by determining the number of units purchased at the 'start date' (10,000 divide by the unit price at start date) multiplied by the unit price at the 'current date'. 

 

I have created a measure to determine the earliest unit price selected:

Earliest Unit Price = CALCULATE ( MIN ( 'Unit Prices'[Unit Price] ), FIRSTDATE ( 'Unit Prices'[Date] ) )
 
I have created another measure to determine the number of units initially held: 
Starting Units Held = 10000 / [Earliest Unit Price]
 
I have placed the 'date' field into the line graph, but am struggling to work out a measure to place into the 'values' field on the line graph which shows the value of the investment over time (taking into account the 'start' and 'end' dates selected by the slicer). 
 
Any assistance is greatly appreciated!
 
3 REPLIES 3
amitchandak
Super User
Super User

Can you share some sample data and expected output. If possible please share a sample pbix file after removing sensitive information.Thanks.

My Recent Blog -

https://community.powerbi.com/t5/Community-Blog/HR-Analytics-Active-Employee-Hire-and-Termination-tr...

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

I have shared the pbix on google drive here: https://drive.google.com/open?id=1gNGWkgBJugLZaBxEyTY7SP5uRRbRXC-z 

 

At the moment I have the chart displaying the unit prices over time - However, I would like the line graph to show the value of a $10,000 investment over time (taking into account the 'start' and 'end' dates of the date slicer). 

dax
Community Support
Community Support

Hi @Paulo84 ,

I am not clear your requirement, if possible, could you please explain "However, I would like the line graph to show the value of a $10,000 investment over time (taking into account the 'start' and 'end' dates of the date slicer). " to me? Please show me your expected output. Then I will help you more correctly.

Please do mask sensitive data before uploading.

Thanks for your understanding and support.
Best Regards,
Zoe Zhi

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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