<?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 Calculate Exchange rate for every day &amp;quot;USD&amp;quot; in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-Exchange-rate-for-every-day-quot-USD-quot/m-p/2208223#M52044</link>
    <description>&lt;P&gt;Hello community!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In previous post we had an issue that we needed to fill empty cell with exhange rate from cells of the closest calendar data.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.powerbi.com/t5/user/viewprofilepage/user-id/24978" target="_blank"&gt;@smpa01&lt;/A&gt;&amp;nbsp;helped us to solve this task &lt;A href="https://community.powerbi.com/t5/DAX-Commands-and-Tips/Calculate-Exchange-rate-for-every-day/m-p/2207879#M52020" target="_self"&gt;here&amp;nbsp;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;But now I need to make some more calculations, and for that purpose we need to make a collum which will display all cells in USD. We need to multiply mesure M2 with USD currency, so we made a collum with USD currency, but the problem is when we have a row in table, that displays EUR, PLN etc, the cell stays empty. We need to fill all empty cells, no matter what currency was in a row, with USD&lt;BR /&gt;&lt;img /&gt;&lt;img /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://drive.google.com/file/d/18I7dM418G5t0bOwzlQM4N6HNjBDaIjbI/view?usp=sharing" target="_self"&gt;Files example&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 25 Nov 2021 18:12:50 GMT</pubDate>
    <dc:creator>DimaMD</dc:creator>
    <dc:date>2021-11-25T18:12:50Z</dc:date>
    <item>
      <title>Calculate Exchange rate for every day "USD"</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-Exchange-rate-for-every-day-quot-USD-quot/m-p/2208223#M52044</link>
      <description>&lt;P&gt;Hello community!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In previous post we had an issue that we needed to fill empty cell with exhange rate from cells of the closest calendar data.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.powerbi.com/t5/user/viewprofilepage/user-id/24978" target="_blank"&gt;@smpa01&lt;/A&gt;&amp;nbsp;helped us to solve this task &lt;A href="https://community.powerbi.com/t5/DAX-Commands-and-Tips/Calculate-Exchange-rate-for-every-day/m-p/2207879#M52020" target="_self"&gt;here&amp;nbsp;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;But now I need to make some more calculations, and for that purpose we need to make a collum which will display all cells in USD. We need to multiply mesure M2 with USD currency, so we made a collum with USD currency, but the problem is when we have a row in table, that displays EUR, PLN etc, the cell stays empty. We need to fill all empty cells, no matter what currency was in a row, with USD&lt;BR /&gt;&lt;img /&gt;&lt;img /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://drive.google.com/file/d/18I7dM418G5t0bOwzlQM4N6HNjBDaIjbI/view?usp=sharing" target="_self"&gt;Files example&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 25 Nov 2021 18:12:50 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-Exchange-rate-for-every-day-quot-USD-quot/m-p/2208223#M52044</guid>
      <dc:creator>DimaMD</dc:creator>
      <dc:date>2021-11-25T18:12:50Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate Exchange rate for every day "USD"</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-Exchange-rate-for-every-day-quot-USD-quot/m-p/2208235#M52046</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="312820" data-lia-user-login="DimaMD" class="lia-mention lia-mention-user"&gt;DimaMD&lt;/a&gt;&amp;nbsp; to confirm, what I provided you previously, it should only do the calculation for "USD" only, meaning if the cell value is USD then do the calculation accordingly otherwise overwrite any other currecny as "USD" and do the calculation? Please confirm&lt;/P&gt;</description>
      <pubDate>Thu, 25 Nov 2021 18:26:35 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-Exchange-rate-for-every-day-quot-USD-quot/m-p/2208235#M52046</guid>
      <dc:creator>smpa01</dc:creator>
      <dc:date>2021-11-25T18:26:35Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate Exchange rate for every day "USD"</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-Exchange-rate-for-every-day-quot-USD-quot/m-p/2208244#M52047</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Yes, correct. If the row have other currency, we need to overwrite it as closest “up to date” "USD" and do the calculation.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 25 Nov 2021 18:34:01 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-Exchange-rate-for-every-day-quot-USD-quot/m-p/2208244#M52047</guid>
      <dc:creator>DimaMD</dc:creator>
      <dc:date>2021-11-25T18:34:01Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate Exchange rate for every day "USD"</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-Exchange-rate-for-every-day-quot-USD-quot/m-p/2208295#M52050</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="24978" data-lia-user-login="smpa01" class="lia-mention lia-mention-user"&gt;smpa01&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;I managed to find a solution on my own&lt;BR /&gt;I unscrewed the table of exchange rates "USD"&lt;BR /&gt;&lt;img /&gt;&lt;BR /&gt;then created a column in which the exchange rate for the previous day is returned&lt;BR /&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;and so I got the desired result&lt;BR /&gt;&lt;img /&gt;&lt;BR /&gt;I hope it will be useful for someone, what is your opinion&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="24978" data-lia-user-login="smpa01" class="lia-mention lia-mention-user"&gt;smpa01&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 25 Nov 2021 19:56:31 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-Exchange-rate-for-every-day-quot-USD-quot/m-p/2208295#M52050</guid>
      <dc:creator>DimaMD</dc:creator>
      <dc:date>2021-11-25T19:56:31Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate Exchange rate for every day "USD"</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-Exchange-rate-for-every-day-quot-USD-quot/m-p/2208299#M52052</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="312820" data-lia-user-login="DimaMD" class="lia-mention lia-mention-user"&gt;DimaMD&lt;/a&gt;&amp;nbsp; I did not have time at all to look into it; will update you once I get a chance.&lt;/P&gt;</description>
      <pubDate>Thu, 25 Nov 2021 20:16:06 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-Exchange-rate-for-every-day-quot-USD-quot/m-p/2208299#M52052</guid>
      <dc:creator>smpa01</dc:creator>
      <dc:date>2021-11-25T20:16:06Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate Exchange rate for every day "USD"</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-Exchange-rate-for-every-day-quot-USD-quot/m-p/2209745#M52110</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="312820" data-lia-user-login="DimaMD" class="lia-mention lia-mention-user"&gt;DimaMD&lt;/a&gt;&amp;nbsp; try out this measure along the same line as the previous one&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Measure4 = 
VAR _0 =
    ADDCOLUMNS ( Costs, "newCurrency", "USD" )
VAR _2 =
    ADDCOLUMNS (
        _0,
        "dt2",
            VAR dt =
                CALCULATE (
                    CALCULATE (
                        MAX ( 'Exchange rate'[Date] ),
                        TREATAS (
                            SUMMARIZE ( _0, [Date], [newCurrency] ),
                            'Exchange rate'[Date],
                            'Exchange rate'[Currency]
                        )
                    )
                )
            RETURN
                IF (
                    dt = BLANK (),
                    MAXX (
                        FILTER (
                            'Exchange rate',
                            'Exchange rate'[Currency] = EARLIER ( [newCurrency] )
                                &amp;amp;&amp;amp; 'Exchange rate'[Date] &amp;lt;= EARLIER ( [Date] )
                        ),
                        'Exchange rate'[Date]
                    ),
                    dt
                )
    )
VAR _3 =
    ADDCOLUMNS (
        _2,
        "val",
            MAXX (
                FILTER (
                    'Exchange rate',
                    'Exchange rate'[Currency] = EARLIER ( [newCurrency] )
                        &amp;amp;&amp;amp; 'Exchange rate'[Date] = EARLIER ( [dt2] )
                ),
                'Exchange rate'[Exchange rate]
            )
    )
RETURN
    SUMX ( _3, [val] * [Costs] )&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 26 Nov 2021 16:04:05 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-Exchange-rate-for-every-day-quot-USD-quot/m-p/2209745#M52110</guid>
      <dc:creator>smpa01</dc:creator>
      <dc:date>2021-11-26T16:04:05Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate Exchange rate for every day "USD"</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-Exchange-rate-for-every-day-quot-USD-quot/m-p/2210481#M52147</link>
      <description>&lt;P&gt;Hi, &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="24978" data-lia-user-login="smpa01" class="lia-mention lia-mention-user"&gt;smpa01&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;so this is also a great solution, I prefer to describe measure. my experience in dax is still small there is still something to learn&lt;/P&gt;</description>
      <pubDate>Sat, 27 Nov 2021 20:48:19 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-Exchange-rate-for-every-day-quot-USD-quot/m-p/2210481#M52147</guid>
      <dc:creator>DimaMD</dc:creator>
      <dc:date>2021-11-27T20:48:19Z</dc:date>
    </item>
  </channel>
</rss>

