Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi everyone,
So I have been trying for ages in my chart to show the acquisition share price for my stocks and my current share price.
My list boxes to sort the data are the following.
I want the expression in my acquisition price column to show me the share price on the first day of 2012. And I want my expression for my most recent share price to show the share price on the most recent day of the most recent year (in this case last day of 2014).
How do I set this up?
So far I have this:
Sum({$<Day={'$(=Min(Day))'}>}[Close]) for acquisition price
Sum({$<Day={'$(=Max(Day))'}>}[Close]) for current price
But when I click on 2012, 2013, or 2014 it changes the values, and I want only the first day of 2012 (acquisition) to show up and the last day of 2014 (current price). How do I lock the equation so that this is the case and that the values only change if I click on 'Stock'.
Maybe like this:
Sum({$<Day={'$(=Min({1} Day))'}, Year=, Month= >}[Close]) for acquisition price
Sum({$<Day={'$(=Max({1} Day))'}, Year=, Month= >}[Close]) for current price
To get the first day of the current year, try this:
= num(YearStart(Today()))
Of course you can replace "today()" by pointing to a field and that way get the first day of the year you selected.
Good luck .
Maybe like this:
Sum({$<Day={'$(=Min({1} Day))'}, Year=, Month= >}[Close]) for acquisition price
Sum({$<Day={'$(=Max({1} Day))'}, Year=, Month= >}[Close]) for current price
ripping from Swuehl
Sum({$<Day={'$(=Min({<{Year=, Month= }>} Day))'}>}[Close]) for acquisition price
Sum({$<Day={'$(=Max({Year=, Month= } Day))'}>}[Close]) for current price
this way your the min and max will only ignore the selection days, but will still take into consideration "Stock"
Thank you so much!!!