Forum Discussion
Johann_32
1 year agoAdvocate II
Dynamic Years
Hello Experts, I would need your support in a report that has a special requirement on showing years dynamically. Description of Requirement: In the charts of the reports, there should ALWAYS b...
- 1 year ago
You could create a couple of measure like
5 Years Visible = VAR CurrentYear = MAX ( 'Date'[Year] ) VAR ChosenYear = [Previous version] VAR Result = IF ( CurrentYear >= ChosenYear && CurrentYear <= ChosenYear + 5, 1 ) RETURN Resultwhere [Previous Version] is a measure which returns the desired start year according to your logic.
Apply this measure as a filter on the visuals set to show only when the value is 1.
johnt75
1 year agoSuper User
You could create a couple of measure like
5 Years Visible =
VAR CurrentYear =
MAX ( 'Date'[Year] )
VAR ChosenYear = [Previous version]
VAR Result =
IF ( CurrentYear >= ChosenYear && CurrentYear <= ChosenYear + 5, 1 )
RETURN
Result
where [Previous Version] is a measure which returns the desired start year according to your logic.
Apply this measure as a filter on the visuals set to show only when the value is 1.