dynamic time range insight
1 TopicDAX - dynamic time range on trend chart issue
Hello, Im struggling with a DAX measure that allow to switch time range dynamically as per selected time periods on the slicers. I would like my chart to present only last 12 months time rage of recent data ('Date" column) as a default view but if somebody needs to select specific item in the Calendar Table ("Date") it should "reset" this 12 months default period and show the data in a selected time period like below conditional formula: Customized Total = IF(ISFILTERED('Date'), SUM(Headcount[Employees]), CALCULATE(SUM(Headcount[Employees]), FILTER('Date', DATESINPERIOD('Date', MAX('Date'[Date]), -12, MONTH))) I have to admit I did something similar already and it works perfectly however it was created on latest date not the whole range: example Current No. Employees = VAR CurrentEmployment = CALCULATE(MAX('Date'[Date]), ALL('Date')) RETURN CALCULATE( SUM(Headcount[Employees]), 'Date'[Date] = CurrentEmployment ) Any Hits, suggestions would be much appreciated. Thank You Ps. I tried Chat GPT already but with no success...1.2KViews0likes6Comments