Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
I am developing a custom connector , There are various methods which needs to have a same variable as parameter . Is there an way to declare a variable global , whose value keeps on changing after every method and hold their new value ?
Hello,
Did you find a solution to this problem?
I have a similar problem where I need to store some state or global variable between the GetType and GetRows of Table.View.
Tx
Koen
The idea of a global variable is not tied to table variables only, although scalar variables can be implemented through measures today. The fundamental difference with a calculated table, obviously, is that a global variable is evaluated at reporting time in a context-dependent way.
Hi @Anonymous,
In my opinion, I'd like to suggest you define this 'global variable' as a query parameter. It can be invoked in your query table/steps and you can manually modify it on power query side.
Using Query Parameters in Power BI Desktop
Regards,
Xiaoxin Sheng
@v-shex-msft thanks , but I want to use it in my Custom Connector , not for report . Is there any way like this in custom connector? or power query?
HI @Anonymous,
It is possible to setting an optional parameter with default value in your connector, but you cant write back and change the default value which is defined in the custom connector. (New connector only existed the default value, changed new value not able sync to connections used the same connector)
For query parameters, you only need to invoke it in connections. These invoked parameter values will update if you modify the current value of query parameter.
For example:
Query parameter:
QP1=1, QP value will sync to all connectors who invoked it.
Your query tables:
Source1=CustomConnecotor(connectionstring1, QP1)
Source2=CustomConnecotor(connectionstring2, QP1)
Regards,
Xiaoxin Sheng
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
111 | |
95 | |
80 | |
68 | |
59 |
User | Count |
---|---|
150 | |
119 | |
104 | |
87 | |
67 |