How to find out highest value with a date and lowest value with a date when i have three columns (Column 1: Date , Column 2: High , Column 3: Low )

Description

Hi, I am trying to go through a CSV file that I got from Yahoo Finance for a Company > historical data > download ( I did all this through a web recording using clicks and type into and then saved the CSV file.

  1. How to find out hightest value with a particular date (Column 1: Date , Column 2: High)
  2. How to find out lowest value with a particular date (Column 1: Date , Column 3: Low )

My Data Looks like below mentioned table:

 Date	          High	 Low

Sep 25, 2024 381.85 371
Sep 24, 2024 377.8 366.25
Sep 23, 2024 372.7 363.7
Sep 20, 2024 367 360.6
Sep 19, 2024 368.85 351.1
Sep 18, 2024 376 359.9
Sep 17, 2024 395.65 374.25
Sep 16, 2024 394.95 380.5
Sep 13, 2024 383.8 372.45
Sep 12, 2024 394.1 374.8
Sep 11, 2024 394.9 382.85
Sep 10, 2024 389.6 378.3
Sep 9, 2024 379.7 365.95
Sep 6, 2024 386.5 369.3
Sep 5, 2024 394.4 381
Sep 4, 2024 383.5 355.5
Sep 3, 2024 366.4 361.05
Sep 2, 2024 368 359
Aug 30, 2024 362.8 350.65
Aug 29, 2024 364.6 350.05
Aug 28, 2024 363.65 353.3

Link

https://finance.yahoo.com/quote/BIOCON.BO/history/

Date

2024-09-26

Related UiPath products

Studio

Hi @Kruthi_BS

You tried this one,

Try this

Maximum date = Dt_yourdatatable.AsEnumerable().Max(Function (r) DateTime.Parse(r.Item("YourColumnName").ToString))

Minimum date = Dt_yourdatatable.AsEnumerable().Min(Function (r) DateTime.Parse(r.Item("YourColumnName").ToString))

Maximum value = dt.AsEnumerable().Max(Function(row) Convert.ToDouble(row("YourColumnName")))

Minimum Value = dt.AsEnumerable().Min(Function(row) Convert.ToDouble(row("YourColumnName")))

Regards,
Gowtham K

Build datatable:
image

Sort options:
image

Please note, you need to modify the output to suit your requirement. I’ve only shown the date for the high value.

Thank you for the suggestion. Can you also tell me how to add each column values in the"Build Data table" .

Thank you for the suggestion. Do i need to create data table first from CSV file or excel?

image
image
image
Data extracted :
image
image

Can you tell me How to take it forward from this step.

In your case you already have a DT - “ExtractDataTable”; just sort it based on one col first, get the value, sort again using the other col and get the value.

can you explain with the steps with images .

Here you go:
Test_Kruthi_BS.zip (5.1 KB)

Note: you may have to change the browser as I don’t use Chrome :slightly_smiling_face: