<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Calculate Bookings FX gap in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-Bookings-FX-gap/m-p/4153749#M165083</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="485210" data-lia-user-login="tomasjezek" class="lia-mention lia-mention-user"&gt;tomasjezek&lt;/a&gt;&amp;nbsp;,&lt;BR /&gt;I am sorry, as I am not a professional in calculating foreign exchange, I may not be able to understand your needs accurately, can you add some graphs of the results you are trying to get so that I can better solve your problem, here is my humble insight, if there is a shipment, use the exchange rate of the shipment, if there is no shipment, use the average of the exchange rate of the opening and closing backlogs to calculate and then finally summarize them, I look forward to your reply, I will get back to you as soon as I receive your message!&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Measure = 
IF(
    'Calculations'[Shipments]&amp;gt;0,
    [Shipments]*[Avg FX_shipmnets],
   ([Beg.Backlog]*[Avg FX_beg.backlog]+[End.Backlog]*[Avg FX_end.backlog])/2)

&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope it helps!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best regards,&lt;BR /&gt;Community Support Team_ Tom Shen&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If this post helps then please consider&amp;nbsp;&lt;STRONG&gt;Accept it as the solution&lt;/STRONG&gt;&amp;nbsp;to help the other members find it more quickly.&lt;/P&gt;
&lt;DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;/DIV&gt;</description>
    <pubDate>Tue, 17 Sep 2024 05:27:37 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2024-09-17T05:27:37Z</dc:date>
    <item>
      <title>Calculate Bookings FX gap</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-Bookings-FX-gap/m-p/4152272#M165016</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would like to crete a DAX measure for Bookings &lt;FONT color="#339966"&gt;FX Gap&lt;/FONT&gt;. Example of the calculaton is in the table below:&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&lt;STRONG&gt;Beg. backlog&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD&gt;&lt;STRONG&gt;Shipments&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD&gt;&lt;STRONG&gt;End Backlog&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD&gt;&lt;STRONG&gt;Bookings&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD&gt;&lt;STRONG&gt;Bookings in USD&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT color="#339966"&gt;&lt;STRONG&gt;FX Gap&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Coverage in orig. currency (i.e. JPY)&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1,930,000&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 150,000&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2,500,000&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 720,000&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 4,601&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (194)&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Coverage $&lt;/TD&gt;&lt;TD&gt;$12,293&lt;/TD&gt;&lt;TD&gt;$958&lt;/TD&gt;&lt;TD&gt;$16,129&lt;/TD&gt;&lt;TD&gt;$4,795&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;FX&lt;/TD&gt;&lt;TD&gt;0.006369427&lt;/TD&gt;&lt;TD&gt;0.006389776&lt;/TD&gt;&lt;TD&gt;0.006451613&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Basically I have two columns for Coverage: the coverage in USD and the Coverage in invoice currency. I can calculate FX for different situations (Beginning backlog, Shipments, Ending Backlog), but for FX Gap I will need to use Avg. FX within concrete Fiscal Week period, but only the one from Shipments situation.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If in the specific Fiscal Week (FY-FW) period there is no Shipments, then use the following logic:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;There might be some data issues in column 'Sales - Invoice Currency' esp. when Currency = JPY, when beginning and ending backlog in that currency are in USD, but Shipmnets is in JPY, but you can skip this issue.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Power BI File with data, bookings measures and pivot table in which the FX gap should be added is here:&lt;/P&gt;&lt;P&gt;&lt;A href="https://upload.nolog.cz/download/91f8c14ca197503e/#_nHb0l8_EjmMKcDpnis5aA" target="_blank"&gt;https://upload.nolog.cz/download/91f8c14ca197503e/#_nHb0l8_EjmMKcDpnis5aA&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Tomas&lt;/P&gt;</description>
      <pubDate>Mon, 16 Sep 2024 11:35:48 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-Bookings-FX-gap/m-p/4152272#M165016</guid>
      <dc:creator>tomasjezek</dc:creator>
      <dc:date>2024-09-16T11:35:48Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate Bookings FX gap</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-Bookings-FX-gap/m-p/4153749#M165083</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="485210" data-lia-user-login="tomasjezek" class="lia-mention lia-mention-user"&gt;tomasjezek&lt;/a&gt;&amp;nbsp;,&lt;BR /&gt;I am sorry, as I am not a professional in calculating foreign exchange, I may not be able to understand your needs accurately, can you add some graphs of the results you are trying to get so that I can better solve your problem, here is my humble insight, if there is a shipment, use the exchange rate of the shipment, if there is no shipment, use the average of the exchange rate of the opening and closing backlogs to calculate and then finally summarize them, I look forward to your reply, I will get back to you as soon as I receive your message!&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Measure = 
IF(
    'Calculations'[Shipments]&amp;gt;0,
    [Shipments]*[Avg FX_shipmnets],
   ([Beg.Backlog]*[Avg FX_beg.backlog]+[End.Backlog]*[Avg FX_end.backlog])/2)

&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope it helps!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best regards,&lt;BR /&gt;Community Support Team_ Tom Shen&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If this post helps then please consider&amp;nbsp;&lt;STRONG&gt;Accept it as the solution&lt;/STRONG&gt;&amp;nbsp;to help the other members find it more quickly.&lt;/P&gt;
&lt;DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;/DIV&gt;</description>
      <pubDate>Tue, 17 Sep 2024 05:27:37 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-Bookings-FX-gap/m-p/4153749#M165083</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-09-17T05:27:37Z</dc:date>
    </item>
  </channel>
</rss>

