{"type":"video","version":"1.0","html":"<iframe src=\"https://www.loom.com/embed/e680b4bf0d8a4f46a47e07b024781c07\" frameborder=\"0\" width=\"1664\" height=\"1248\" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>","height":1248,"width":1664,"provider_name":"Loom","provider_url":"https://www.loom.com","thumbnail_height":1248,"thumbnail_width":1664,"thumbnail_url":"https://cdn.loom.com/sessions/thumbnails/e680b4bf0d8a4f46a47e07b024781c07-b973f28e8e459052.gif","duration":374.6062,"title":"Dynamically Switching Date Granularity based on Filter","description":"In this video, I demonstrate a useful pattern for automatically switching time granularities in charts or dashboards based on filter selections, particularly for time series data. For instance, if you typically view daily data but want to analyze a specific day in detail, this method allows the chart to switch to hourly granularity without manual adjustments. I walk you through creating a dynamic date field in the workbook model, which responds to the filter range—showing hourly data for selections under two days and daily data for longer ranges. I encourage you to implement this pattern in your own analyses and consider adjusting the time thresholds to fit your needs."}