Forum Discussion

zacharylwy's avatar
zacharylwy
Frequent Visitor
2 years ago
Solved

Slider Slicer to Control Time Lag

is it possible to add a slicer that can add varying time-lags to a column that is indexed on dates?
For context, my table might look like:

Date                       No. Ships     Published Price of Index                     
1/1/20201215
2/1/20201517
3/1/20201719

And this can give me a pretty standard line chart + maybe a numerical value for the correlation between the two. I plan to use a card visual that can calcualate and display the correlation between two columns.

However, I know that there will be a delay (of maybe 3,5,7,15,30 days) before the number of Ships affect the index price. I want to be able to add a slicer that will allow users to choose the number of days that should be applied to the Published Price of Index and affect the graph and card visual accordingly. This is also to show people how the correlation changes as the lags change. 

Following the table above, a 1-day lag will make the data look like:

Date                        No. Ships    Published Price of Index                    
1/1/202012 
2/1/20201515
3/1/20201717

And this would give me a higher correlation (after ignoring empty rows).