Follow us: Connect on YouTube Connect on YouTube Connect on YouTube


Thursday, 16 June 2016

Query to Get GL Exchange Rates

SELECT typ.user_conversion_type "Conversion Type"
,      rat.from_currency        "From Currency"
,      rat.to_currency          "To Currency"
,      MIN(conversion_date)     "Earliest Date"
,      MAX(conversion_date)     "Latest Date"
FROM   gl_daily_conversion_types typ
,      gl_daily_rates            rat
WHERE  rat.conversion_type = typ.conversion_type
AND    rat.from_currency   < rat.to_currency -- Ensure pairs only shown once.
GROUP BY typ.user_conversion_type
,        rat.from_currency  
,        rat.to_currency
ORDER BY 1,2,3
Share this article :


  1. Hello There,

    You make learning and reading addictive. All eyes fixed on you. Thank you being such a good and trust worthy guide.

    I have a data table with 80M records that looks like any other typical Sales Fact with fields like DateID, ProductID, SupplierID,QuantitySold and I am trying to write a DAX calculation that gives me the QuantitySold in past 30/60/90 days.
    The catch is if the month is part done (example: April 15th), then this measure should show only until that day as the total at the month level instead of as of last day of the month.
    I have tried many ways and finally ended up on this as it was working perfectly
    VAR MaxDate = LASTDATE(FactSales[SaleDt])

    'Date'[Date] > DataMaxDate -30 &&
    'Date'[Date] < DataMaxDate))
    Having said that, the reports that have all these 3 measures along with Date / Product and Supplier Attributes is not returning data even with the bare minimum filters.

    Thank you very much and will look for more postings from you.

    Thank you,

  2. Your blog never ceases to amaze me, it is very well written and organized.–;*; usd to eur

  3. This is my first time i visit here. I found so many interesting stuff in your blog especially its discussion. From the tons of comments on your articles, I guess I am not the only one having all the enjoyment here keep up the good work BTC to ETH

  4. Cool stuff you have got and you keep update all of us. btc to skrill

  5. Yes i am totally agreed with this article and i just want say that this article is very nice and very informative article.I will make sure to be reading your blog more. You made a good point but I can't help but wonder, what about the other side? !!!!!!Thanks Bitmain antminer S19 Pro price

  6. Amazing post with quality information! Many wonder, how to recover stolen or scammed Bitcoin? Hire a professional hacker online

  7. This is a great inspiring article.I am pretty much pleased with your good work.You put really very helpful information. Keep it up. Keep blogging. Looking to reading your next post. 토토꽁머니

  8. This was a really great contest and hopefully I can attend the next one. It was alot of fun and I really enjoyed myself.. exchanger24

  9. Thanks for the blog loaded with so many information. Stopping by your blog helped me to get what I was looking for.
    antminer s19 pro (110th)

  10. I prefer merely excellent resources - you will see these people in: Best Large Air Fryers