I have a KPI which calculates the average of a database column for the current year. I also have a line graph that shows the average for this column for each year. The issue is that the KPI is returning 9.5 whilst the line graph is showing 6.5.
I have vCurrentYear as a variable equal to today's year - this is working and equates to 2021.
The KPI measure: avg(if(year(created_at)=vCurrentYear, total_no_of_visits))