If else logic to refresh

Ssh130

New Member
Joined
Nov 25, 2021
Messages
1
Office Version
  1. 365
Platform
  1. Windows
Hi Need help to write logic: if 'DATE1' is less than current date, then create a new table and refresh . The purpose is to fetch new data if avlbl everyday automatically if possible from same link and update to same table per new date or add table as a loop



Sharing the file as well if helps context

5DAY daily.pbix

----------------------------

let
Source = Csv.Document(Web.Contents("https://www1.nseindia.com/products/content/sec_bhavdata_full.csv"),[Delimiter=",", Columns=15, Encoding=1252, QuoteStyle=QuoteStyle.None]),
#"Promoted Headers" = Table.PromoteHeaders(Source, [PromoteAllScalars=true]),
#"Changed Type" = Table.TransformColumnTypes(#"Promoted Headers",{{"SYMBOL", type text}, {" SERIES", type text}, {" DATE1", type date}, {" PREV_CLOSE", type number}, {" OPEN_PRICE", type number}, {" HIGH_PRICE", type number}, {" LOW_PRICE", type number}, {" LAST_PRICE", type number}, {" CLOSE_PRICE", type number}, {" AVG_PRICE", type number}, {" TTL_TRD_QNTY", Int64.Type}, {" TURNOVER_LACS", type number}, {" NO_OF_TRADES", Int64.Type}, {" DELIV_QTY", type text}, {" DELIV_PER", type text}})
in
#"Changed Type"
 

Excel Facts

What is =ROMAN(40) in Excel?
The Roman numeral for 40 is XL. Bill "MrExcel" Jelen's 40th book was called MrExcel XL.

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top