Disclaimer: I do not use Fava. But most likely in the the report you refer to in Fava, it uses the exchange rate available at the date of the transaction. In another words the latest exchange rate, specified by the *price *notation with the date equal of less then the date of the transaction. In this case this would follow the generally accepted accounting practices, where when generating a report for P&L accounts one shall use an exchange rate of that day.
Since in your example of a ledger you specify prices at the end of the month, this would be what you said: the price of the last month To do the same in the beanquery you mentioned, you need to do it like that: *convert(position, "INR", date)* Without that, beanquery uses the latest available exchange rate (85.2000 in your case), which, frankly speaking, I am not sure makes much sense from the accounting point of view. On Wednesday, August 27, 2025 at 9:31:35 AM UTC+2 [email protected] wrote: > Team, > > The exchange rate used by fava follows the convention of using the last > price quote available for the previous month for the conversions. > > However, the report generated by bean-query uses a single exchange rate > *(85.2000)* for all transactions across the year for the below query. > > *bean-query -f csv -m prabu.beancount 'select date, account, position, > convert(position, "INR"), description from date >= 2024-04-01 AND date <= > 2025-03-31 where account ~ "Income" and account ~ "Dividend" or account ~ > "Interest" or account ~ "withholding" or account ~ "slb"' * > > I''ll appreciate if someone can explain how to get similar results as fava > using bean-query? > > My ledger options are as follows: > > > > > > > > > > > > *option "title" "Prabu Ledger"option "operating_currency" "INR"option > "insert_pythonpath" "True"option "inferred_tolerance_default" > "*:0.000001"importers-master/config_prabu.py"2010-07-25 custom > "fava-option" "import-dirs" "Downloads"2010-07-25 custom "fava-option" > "fiscal-year-end" "03-31"2010-07-25 custom "fava-option" > "show-accounts-with-zero-transactions" "False"2010-07-25 custom > "fava-option" "show-accounts-with-zero-balance" "False"plugin > "beancount.plugins.implicit_prices"plugin "beancount.plugins.auto"* > > > > > > > > > > > > > > > > > **** Exchange Rates for 2024-2025; Exchange rates for USD2024-03-30 price > USD 82.9500 INR2024-04-26 price USD 82.9000 INR2024-05-31 price USD 83.0500 > INR2024-06-29 price USD 83.0000 INR2024-07-31 price USD 83.3200 > INR2024-08-31 price USD 83.5000 INR2024-09-30 price USD 83.3000 > INR2024-10-31 price USD 83.6800 INR2024-11-30 price USD 84.1500 > INR2024-12-31 price USD 85.2000 INR2025-01-31 price USD 86.2000 > INR2025-02-27 price USD 86.1500 INR2025-02-28 price USD 86.9500 > INR2025-03-29 price USD 85.2000 INR* > > Regards, > Prabu > -- You received this message because you are subscribed to the Google Groups "Beancount" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion visit https://groups.google.com/d/msgid/beancount/618029f5-8024-41bc-aaf1-696c73dcaeden%40googlegroups.com.
