Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Sleopol1995
Regular Visitor

PowerBI Parameters, and Python

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. 

 

Sleopol1995_0-1625575073826.png

 

 

Thank you! 

1 REPLY 1
Anonymous
Not applicable

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.

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors