Sep 1, 2022 13:56
and this is wrong because the currency we are looking for this example is the one with 2011-05-01
Sep 1, 2022 13:56
if we have for example a currency for a date: 2011-05-24, two currencies dates: 2011-06-01 and 2011-05-01, the datediff will pickup the date with few days to 2011-05-24, which is 2011-06-01
Sep 1, 2022 13:54
datediff in pyspark returns different in days between two days
Sep 1, 2022 13:53
There is a problem in the reasoning of the datediff
Sep 1, 2022 13:53
Hello Samkart
Aug 25, 2022 15:57
i just got the error i made
Aug 25, 2022 15:57
Your code was correct
Aug 25, 2022 14:22
something like : withcolumn('converted_value', func.when(curr_from == 'EUR', 'value_to_convert').otherwise(conversion formula)
Aug 25, 2022 14:19
why don't we use another way of doing this logique
Aug 25, 2022 14:19
There is no problem with the data for this id
Aug 25, 2022 14:11
am checking the data for 0013425466
Aug 25, 2022 14:06
what does coalesce do?
Aug 25, 2022 14:05
yes it doesnt
Aug 25, 2022 14:03
like me
Aug 25, 2022 14:03
why you not getting duplicates
Aug 25, 2022 14:01
with when. otherwise
Aug 25, 2022 14:01
what if we change the coeslcse
Aug 25, 2022 14:00
i got the same problem
Aug 25, 2022 13:58
i will try it
Aug 25, 2022 13:57
0019374142 and 0019374530
Aug 25, 2022 13:57
yes but notice that the purchase_id is different
Aug 25, 2022 13:56
if value to convert is 199.50 the converted value should remain 199.50
Aug 25, 2022 13:54
but it took another amount
Aug 25, 2022 13:54
since it's from EUR to EUR
Aug 25, 2022 13:54
yes it has two records, but as you see the converted value should remain the same
Aug 25, 2022 13:54
wait i will check
Aug 25, 2022 13:52
You there?
Aug 25, 2022 13:49
5 0013425466 EUR EUR 00030 2018-12-03 199.50 null null 22.500000000000
Aug 25, 2022 13:48
4 0013425466 EUR EUR 00030 2018-12-03 199.50 null null 199.500000000000
Aug 25, 2022 13:48
for id: 0013425466, converted values are duplicated and reversed for some
Aug 25, 2022 13:47
U can check now
Aug 25, 2022 13:38
ok
Aug 25, 2022 13:38
for the EUR case
Aug 25, 2022 13:38
this is what am getting
Aug 25, 2022 13:38
i will deleted it after
Aug 25, 2022 13:38
Look at my post again i added the screen shot there
Aug 25, 2022 13:35
did you check my last df1 and df2
Aug 25, 2022 13:35
maybe because i don't have all privilèges
Aug 25, 2022 13:34
i don't have it hahaha
Aug 25, 2022 13:34
but i'm not getting this
Aug 25, 2022 13:34
This is the output am looking for
Aug 25, 2022 13:33
I dont have it never mind
Aug 25, 2022 13:30
shot
Aug 25, 2022 13:30
how can i send yo screen sot ?
Aug 25, 2022 13:29
and 'dt' is from df1
Aug 25, 2022 13:29
but in the 3rd line you using over(wd?partionnedBy('from_curr','dt')
Aug 25, 2022 13:27
from_curr_start_dt?
Aug 25, 2022 13:24
net_amount_in_transaction_currency = value_to_convert
Aug 25, 2022 13:24
currency_rates_exchange =df2
Aug 25, 2022 13:24
purchase_order_item = df1