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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

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
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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