Forum Discussion
Area Chart
vanessa You certainly can do that. Go to query editor in power bi desktop, select your date column right click and duplicate. Then select duplicated column, under Transform tab select Date dropdown, Year and Year which will extract out year out of date. Then simply use extracted year column under Legend section of Area chart along with Category and Axis values.
I want the current year to be selected dynamically using YEAR(today()) and comparing it to the year from the date field. the aprroach you mentioned will be like a static selection. won't it?
- ankitpatira10 years agoCommunity Champion
vanessa in that case create conditional column via query editor as where year value in year column is equal to 2016 then current year else previous year and use that conditional column in legend area. unfortunately that will also be somewhat static as you would have to update that condition column each year but currently you can't use measure (like you proposed) under Legend area of Area chart.
- vanessa10 years agoPost Patron
Is there any way i can use a dynamic filter for the graph under visual filter ?
I want to display the area graph for year greater than equal to previous year. Is it possible? or can we only use a static filter in powerbi by hardcoding the value?