Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
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!