Forum Discussion

Paulo84's avatar
Paulo84
Frequent Visitor
6 years ago

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

      • dax's avatar
        dax
        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.