Here is a good explainer of what that error message means:
Typically when I run into that error I start trouble shooting by checking the fields that I have in my calculated field and make sure that I have them in my visual. Also, can you provide more context for your use case, why are you taking an average of an average in this case?
With a KPI visual you are able to achieve a period over period percent difference within the visual. For example, below I have sales with a month over month difference displayed as a percent:
Above I have my Date field aggregated by month, but if I go into the field well and change this to a different period the visual will update as well.
I think what you might be running into here is that you added a dimension to your calculated field [{id_customer}] and the visual is expecting to see that in the field wells to complete the group-by. To fix this, what are you ultimately trying to see with your KPI visual? If you want to see the average of your {limit_p} field by customer id, and see all customer ids, I would recommend using a different visual. Or you could apply a parameter control to this KPI so that your reader and can filter the visual by specific customer ids.
I have a KPI visual with the current month’s value, another KPI visual with the previous month’s value.
And I have a third KPI visual that I need to make the percentage variation between the two KPI visuals, but the last KPI does not make the correct calculation.
I think what you are asking for is in my screenshot above. You can use one KPI visual to show the metric for this month and previous month, and have your center value be the percent difference between those two values.
The problem is when you partition by customer ID and don’t apply that into the KPI field wells the visual build will be missing elements it needs to understand the data.