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.
Hi
I have 2 seperate graphs on page Page A and Page B. I use SQL Query to fetch data and represent it on the graph on Page A and page B. The SQL query used for Page A and Page B are same except that the condition varies by Product 1 and product 2 e.g Query for Page A can be like "Select * from <table> where product = Product 1" and Query for Page B can be like "Select * from <table> where product = Product 2".
I want to Parameterize with a single user input for the Product 1 and Product 2 values and accept the user input as Product X. So when a user enters the value as Product 1 the graph should get update in Page A and when the user enters the Value as Product 2, the graph on Page B should get updated. Is it possible to acheieve this and if so how can we do it.
Thanks
Sudhir
Hi @sprasad,
Based on my test, It is possible to achieve it, you can create the different parameters and queries to filter the table. You can refer to below steps:
1.Create two parameters and set the “Current Value”
2.Create two queries to relate the parameters.
Query1= Sql.Database("<ServerName>", "TSQLV3", [Query="select * from Calendar2 where year ='"&Parameter1&"'"])
Query2= = Sql.Database("<ServerName>", "TSQLV3", [Query="select * from Calendar2 where year ='"&Parameter2&"'"])
3.Now you can see the result.
4.You can use the data of “Query1” in your page A and use the data of “Query2” in your page B. Now you can enter the different parameters to show your different data.
Regards,
Daniel He
Hi Daniel,
Thanks for your reply and solution. In fact this is the way I am currently querying by using different variables for the queries in different page/tabs.
But I want to optimize on the input parameters since I end up in entering many input values as there are 5 different pages. So I wanted to input one value in Parameters and according to the Input value it should go to the correct page and sit in the query string for that tab. Again I want to emphasize on my requirement/condition: "So when a user enters the Value as Product 1 the graph should get updated in Page A and when the user enters the Value as Product 2, the graph on Page B should get updated." And I should have only one Parameter variable for "Value"
Thanks
Any clue or any help on this will be very much appreciated.
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 |
---|---|
110 | |
94 | |
80 | |
67 | |
59 |
User | Count |
---|---|
150 | |
119 | |
104 | |
87 | |
67 |