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
Anonymous
Not applicable

extract as table

How do I extract the data in below link as table pl?

 

https://trendlyne.com/equity/calendar/all/all/?start_date=2021-11-09&end_date=2021-12-08&corporate_a...

Used web scraper to get to site map. Can help to map to what the query shud read in pbi?

{"_id":"cal","startUrl":["https://trendlyne.com/equity/calendar/all/all/?start_date=2021-11-09&end_date=2021-12-31&corporate_actions=Results"],"selectors":[{"id":"cal","parentSelectors":["_root"],"type":"SelectorTable","delay":0,"multiple":true,"selector":"table#DataTables_Table_0","tableDataRowSelector":"tbody tr","tableHeaderRowSelector":"thead tr","columns":[{"extract":true,"header":"Stock","name":"Stock"},{"extract":true,"header":"Ex-date","name":"Ex-date"},{"extract":true,"header":"Event","name":"Event"},{"extract":true,"header":"Notes","name":"Notes"}]},{"id":"caldetails","parentSelectors":["_root"],"type":"SelectorLink","selector":".DTFC_Cloned a[target]","multiple":true,"delay":0}]}

 

saurabhsharma19_0-1638837356986.png

saurabhsharma19_1-1638837610506.png

 

1 ACCEPTED SOLUTION

Hi, @Anonymous 

You can follow the steps below to store  previous data tables.
1.disable the query refresh of  prvs table

39.png

2. add a static column 'CreatedDate'

39.png

Then use  Union function to append the previous tables and current table in Report View.

 

In fact ,PowerBI is not suitable for the import and storage of historical data.

If possible, I suggest that you store these historical data through SQL SSMS / EXCEL sheets each time.

 

Best Regards,
Community Support Team _ Eason

 

View solution in original post

7 REPLIES 7
Anonymous
Not applicable

Thanks. Anyways date can be locked to current and retained to use as history to trend you think?

Hi, @Anonymous 

Date created by function 'DateTimeZone.LocalNow()'  is dynamic and will change based on ‘today’. It will not be retained to use as history once you refresh the report.

I think you may also need to disable the option 'include in report refresh'.

36.png

 

Best Regards,
Community Support Team _ Eason

Anonymous
Not applicable

Thanks for the solution. is there a workaround to keep the prvs date static and then append new data by writing a code ? 

Hi, @Anonymous 

You can follow the steps below to store  previous data tables.
1.disable the query refresh of  prvs table

39.png

2. add a static column 'CreatedDate'

39.png

Then use  Union function to append the previous tables and current table in Report View.

 

In fact ,PowerBI is not suitable for the import and storage of historical data.

If possible, I suggest that you store these historical data through SQL SSMS / EXCEL sheets each time.

 

Best Regards,
Community Support Team _ Eason

 

VijayP
Super User
Super User

@Anonymous 
Create a custom column and add this function which creates today's date based on your regional settings and whenever you are downloading this represent that day automatically. But it changes based on each current day

DateTimeZone.LocalNow()

 

if you find my solution is fine then please mark this as accepted solution




Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
MY Blog || My YouTube Channel || Connect with me on Linkedin || My Latest Data Story - Ageing Analysis

Proud to be a Super User!


VijayP
Super User
Super User

@Anonymous 
If I understood your query rightly, this may help you!

Hope this is what you want

https://drive.google.com/file/d/1MAmiwSbMCfrfH4SUIcHk0PzV53g6zTDK/view?usp=sharing




Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
MY Blog || My YouTube Channel || Connect with me on Linkedin || My Latest Data Story - Ageing Analysis

Proud to be a Super User!


Anonymous
Not applicable

Appreciate the revert and perfect solution! missed the step.

An extension of Q: Is there a way to add date when the data was downloaded as every day the records can change?

 

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.