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

Can you AutoAverage in Excel?
There is a drop-down next to the AutoSum symbol. Open the drop-down to choose AVERAGE, COUNT, MAX, or MIN

Forum statistics

Threads
1,223,099
Messages
6,170,107
Members
452,302
Latest member
TaMere

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