Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now
Hi!
I made a script that checks if a table is empty or not, and if it's empty, a pop up message shows up. The problem is that the message shows up like 5 or 6 times, instead of just one. I couldn't find the solution or even the cause of this problem.
(What I really wanted to do in the first place is to evaluate if theres content in that table, and if it's empty, ommit it's visualization, or hide it's page, but couldn't find how, so for now I'm using the pop up, but I would take one of these as a solution as well).
Here is an example of my code:
if len(dataset['Accounts']) == 0:
win32api.MessageBox(0, 'Accounts not found. Visualizations will not load correctly', 'Warning')
I don't understand why it's getting executed some many times.
Thank you in advance!
I got some bad news for you I am afraid. There is no guarantee whatsover that Power Query will run your code only once.
Oh, I see. I read the article. It seems that isn't just an issue with python. I'll try to find another way then.
Thank you!
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
Check out the February 2026 Power BI update to learn about new features.