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

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.

Reply
jbenson
Helper III
Helper III

Website Data

I have a website link connected to pbi. on the link you can change the year and month to view different purchases and sales on the webpage. How do i connect a live query to the webpage so when i change a date on the slicer it will automatically pull data from the webpage with the right month and year i selected from the slicer in pbi

4 REPLIES 4
negi007
Community Champion
Community Champion

@jbenson I know powequery allows you to reterive data basis your input parameter. It might be tricky to achive it I am sure some workaround would be posssible. Below are few links that may take you in the right direction.

 

https://www.thebiccountant.com/2017/03/22/use-slicers-for-query-parameters-in-powerbi/

 

https://spr.com/powerbi-dynamic-calculations/#:~:text=A%20defined%20parameter%20may%20be,referenced%....

 

https://reevessmith.wordpress.com/2014/08/19/power-query-and-stored-procedures-with-parameters/




Did I answer your question? Mark my post as a solution!
Appreciate your Kudos



Proud to be a Super User!


Follow me on linkedin

i looked at those links i am not sure if that will work or not. here is the last part of the link 

?commodityCodes=C,S&transType=P&month=2020-12. If I change the year and month in the url it will change the web report. i want to be able to select a year and month from power bi and have it correctly pull the data from url with same month and year i have seleceted from power bi

Understood.  You can't dynamically pass the value from a slicer and use it to refresh your query.  I propose you make a table that has all the year-month values of interest, load them all, and then have a slicer on the year-month column, so your users get the same experience.

 

Alternatively (not recommended in this case), you could make year-month a parameter, use it in your query, and save the file as a template file (pbit).  Your users would then open the pbit in Power BI and be immediately prompted for a year-month value and the report would refresh.

Pat





Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


mahoneypat
Employee
Employee

It's tricky to refresh the data like that.  It would be more straight forward to load the data from all the year/months of interest, and then use a slicer to allow them to select a specific year/month.  You can make a table with columns for year and month, and then concanetate those values into a web call on each row and then expand/combine all those tables.  Here's one example - (2) Bulk import data from multiple pages on a website with Power BI Desktop - Power BI Tips & Tricks...

 

Pat





Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.