Hello everyone,

I have below data table. I need to get the value of column “price” for each value in “to_curr” column ,with the below condition -

- If the value of “inverse” is ‘n’, then the “price” should come as such
- If the value of “inverse” is ‘y’, then the “price” should be 1/price.

Is this possible to achieve in one liner Linq query?

[date,from_curr,to_curr,inverse,price

07/03/2023 00:00:00,USD,HKD,n,7.833050000000001

07/03/2023 00:00:00,USD,SGD,n,1.34965

07/03/2023 00:00:00,USD,NOK,n,10.701

07/03/2023 00:00:00,USD,BRL,n,4.7861

07/03/2023 00:00:00,USD,PLN,n,4.0719

07/03/2023 00:00:00,USD,AUD,y,0.66835

07/03/2023 00:00:00,USD,NZD,y,0.6160500000000001

07/03/2023 00:00:00,USD,MXN,n,17.068250000000003

07/03/2023 00:00:00,USD,GBP,y,1.26895

07/03/2023 00:00:00,USD,CAD,n,1.3234000000000001

07/03/2023 00:00:00,USD,EUR,y,1.0906500000000001

07/03/2023 00:00:00,USD,SEK,n,10.852250000000002

]