Forum Discussion
Table variable to calculate stuff based on slicer selection
I have a table called FE with multiple security prices (called Price) for each Day over around 3 years.
The daily prices are expressed in USD, so some start at $10 and some start at $1000.
What I'm trying to build is a measure, which effectively takes a sub-section of this big table and stores the small table, with values between dates selected on the Date slicer.
I then want to use this for a visual but I want it so that whatever is selected on the Date slicer, the visual always starts at zero, so the performance is relative.
I have managed to turn the daily unit price into daily change, then daily change in % terms and then I have another column with Cumulative Return, which does what I want, if I show the entire date range on my visual. But it does not work with the slicers. For reference this is my
1 Reply
- lbendlinSuper User
Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).
https://community.powerbi.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-p/963216
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