VISUAL_CALC_REFERENCE_MISSING in KPI

I am trying to get a list of Users who have not logged into my app in the last N days.
To get the distinct count of users, I am using KPI visual.

Min_Days = minOver(min({DaysSinceOrder}),[{username}])

DaysSinceOrder = dateDiff({Date_field},now(),“DD”)

I am trying to get a distinct count of username where Min_Days is less that N (parameter).
But the visual shows this error.

image

With this error code: VISUAL_CALC_REFERENCE_MISSING

could you please assist with this?

Regards,
Likhit

Hi @likhitrai
can you share your visual definition. But i would say date_field or username is missing as a reference to calculate.
BR

The Value field is disctinct count of username

Changing the calculation using PRE_AGG did the trick:

Min_Days = minOver({DaysSinceOrder},[{username}], PRE_AGG)

Not sure if it is the best solution though.

I am trying to find the min days for each username, which is why i though using min({DaysSinceOrder}) would be the way to go.

2 Likes

Hello @likhitrai, from what I can tell, your solution looks like the best way to manage this. If I can think of an alternative way to accomplish this, I will let you know!