I’d appreciate any help on how to filter out rows that contain PE ratios with a value of 0 and volume higher than average volume. I’ve been browsing the forum and using Chat & Copilot, but I cannot solve this issue. All numbers are doubles. I’ve heard filter data can be used (but it has not worked for me) or an if then statement, but I’m unsure on how this would work.
You can use Filter data table or linQ for this
But here what is Average volume is it a column. You first need to get the Average Volume value and then pass it
Use assign activity to find the average volume
Sorry to ask (I’m bad at UiPath), but how would this look like in UiPath? I’m trying to choose values where the Volume Column value is higher than the Average Volume Cloumn Value
Filter data may not be working because excel column type might be General or Text.
you can change column type to number and try or use below code in Assign activity
isolatedData = deletedData.AsEnumerable().Where(Function(row) CDbl(row("PE Ratio").ToString()) > 0 AndAlso CDbl(row("Volume").ToString()) > CDbl(row("Average Volume").ToString())).CopyToDataTable()
use this before For each row in data table activity
If this helps mark this as a solution so it will be helpful for others.