Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Hello everyone,
I'm currently trying to make a python statement that controls an imported message box based on the user's selected parameter.
Currently, I am using the following code to try and accomplish this:
import win32api
if '"&Text.From(Valid?)&"' == 'Yes all data has been validated':
win32api.MessageBox(0, 'All Data is Validated!', 'Data Validation Complete')
else:
'"&Text.From(Valid?)&"'== 'Not all data has been validated'
win32api.MessageBox(0, 'All Data is not Validated!', 'Data Validation Complete')
However, when I make a selection on the parameter it does not seem to control the message box.
Is it a possibility to control an imported message box function based on a user's parameter selection?
Below is a table on which I have based the parameter on. The parameter is a text parameter using the below two values.
Thank you!
Hi @Sleopol1995
Where did you run python, desktop or query editor ? When you make a selection on the parameter ,what’s the result returned ? What is the result you expect ?
If possible, could you provide a complete sample (hiding sensitive information) ?
Best Regards
Community Support Team _ Ailsa Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
76 | |
74 | |
57 | |
38 | |
33 |
User | Count |
---|---|
70 | |
63 | |
55 | |
48 | |
46 |