When I add a Python visual in Power BI Desktop and drag fields to the Values, the script can update. Which version of Desktop are you using? Do you have Python locally installed and the correct Python installation path specified in the Desktop option?
If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards, Winniz
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.