Skip to content Skip to sidebar Skip to footer

Does Power Bi Parameters Are Exposed To Python Globals

I'm working on Power BI requests with Python scripting. I'm able to get the dataset through dataset global variable, but now I'd like to be able to get the passed parameters direct

Solution 1:

I've finally find a solution to my problem. So I didn't figure out how to get parameters directly in Python.

But instead of that I create parameters, let's say parameters A, B, C. To use it in Python, I create a request with the source :

= Table.FromColumns({{A}, {B}, {C}}, {"parameterA", "parameterB", "parameterC"})

After that, my parameters are accessible in the dataset dict with pandas

parameterA = dataset['parameterA'][0])
parameterB = dataset['parameterB'][0])
parameterC = dataset['parameterC'][0])

Hope it helps you

Post a Comment for "Does Power Bi Parameters Are Exposed To Python Globals"