Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Hi
I have a template for a report where I have the following issue:
The report consist of several queries that all depend on the same variables being present ind the database, i.e.
SELECT ...
FROM ...
WHERE VAR1 = A AND VAR2 = B
Every time I make a new report using the template I have to go into every single query and change VAR1 = A and VAR2 = B. Is it instead possible to set A and B to a value from outside the query? Maybe by making a simple table where i set REF1 = A and REF2 = B and then reference this from within the queries with VAR1 = table[REF1] and VAR2 = table[REF2]? In that way i would only have to change the table reference whenever I make a new version from the template.
Thanks
Solved! Go to Solution.
@Christianvs , refer
https://community.powerbi.com/t5/Desktop/How-do-I-pass-parameters-to-my-SQL-statement/m-p/118716
@Christianvs , refer
https://community.powerbi.com/t5/Desktop/How-do-I-pass-parameters-to-my-SQL-statement/m-p/118716
Thanks for the answer amitchandak!
This seems to be just the thing I was looking for
User | Count |
---|---|
99 | |
90 | |
85 | |
74 | |
67 |
User | Count |
---|---|
114 | |
103 | |
100 | |
72 | |
64 |