cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
saurabhsharma19
Helper I
Helper I

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, @saurabhsharma19 

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
saurabhsharma19
Helper I
Helper I

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

Hi, @saurabhsharma19 

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

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

Hi, @saurabhsharma19 

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

@saurabhsharma19 
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

@saurabhsharma19 
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!


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 Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

charticulator_carousel_with_text (1).png

Charticulator Design Challenge

Put your data visualization and design skills to the test! This exciting challenge is happening now through May 31st!

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

Power BI Release May 2022 768x460.png

Check it out!

Click here to read more about the May 2022 updates!