Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
Hi All,
I'm creating a KPI visual that returns the number of behaviour events for a school, with the trend as the Academicc week (starts in September). I've set the target as the average number of events per week;
AverageCount =
var WeekSum=
summarize(
Behaviour,
TermTimes[AcaWeek],
"Count", DISTINCTCOUNT(Behaviour[Index])
)
return
AVERAGEX(
WeekSum,
[Count]
)
The result is that the target is the same as the value. My assumption is that this is because the KPI visual filters the value to the most recent or highest trend value. It seems like that filter is also applied to the target, so the average over all academic weeks becomes the average over the filtered academic week, so the latest week value.
I therefore changed the WeekSum variable to;
var WeekSum=
summarize(
ALLSELECTED(Behaviour),
TermTimes[AcaWeek],
"Count", DISTINCTCOUNT(Behaviour[Index])
)
The target that is displayed is now accurate, but the value is '(Blank)'. I've changed the target to a really simple 'measure=100' target and this also makes the value blank.
What is happening here please, and how can I compare this weeks performance to the average of all weeks?
User | Count |
---|---|
128 | |
108 | |
99 | |
65 | |
62 |
User | Count |
---|---|
136 | |
113 | |
102 | |
71 | |
60 |