<?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: Creating a calculated measurement with data from different tables and days in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Creating-a-calculated-measurement-with-data-from-different/m-p/2546134#M71931</link>
    <description>&lt;P&gt;Hello&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;First create a date table and link both tables.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Second create this measure&lt;/P&gt;&lt;P&gt;weight=&lt;/P&gt;&lt;P&gt;var dateweight=selectedvalue(weight(date))&lt;/P&gt;&lt;P&gt;return&lt;/P&gt;&lt;P&gt;calculate(min(exercice[Date]), exercice[Date]&amp;gt;=dateweight)&lt;/P&gt;</description>
    <pubDate>Sun, 29 May 2022 21:14:06 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2022-05-29T21:14:06Z</dc:date>
    <item>
      <title>Creating a calculated measurement with data from different tables and days</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Creating-a-calculated-measurement-with-data-from-different/m-p/2546123#M71930</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm trying to create a calculation where I can create a ratio between bodyweight and performance in exercises&lt;/P&gt;&lt;P&gt;I currently have two seperate tables. One with bodyweights that are collected on a weekly basis and another where there exercise weights put in on a daily basis. The main issue I have is that the dates don't line up well for example: I have a weight recorded on Monday 5/23/22 and then the exercise was done on Wednesday 5/25/22. Is there a way I can get power bi to find the weight from the nearest date and create a bodyweight ratio to the weight moved?&lt;/P&gt;</description>
      <pubDate>Sun, 29 May 2022 19:31:46 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Creating-a-calculated-measurement-with-data-from-different/m-p/2546123#M71930</guid>
      <dc:creator>drivas771994</dc:creator>
      <dc:date>2022-05-29T19:31:46Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a calculated measurement with data from different tables and days</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Creating-a-calculated-measurement-with-data-from-different/m-p/2546134#M71931</link>
      <description>&lt;P&gt;Hello&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;First create a date table and link both tables.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Second create this measure&lt;/P&gt;&lt;P&gt;weight=&lt;/P&gt;&lt;P&gt;var dateweight=selectedvalue(weight(date))&lt;/P&gt;&lt;P&gt;return&lt;/P&gt;&lt;P&gt;calculate(min(exercice[Date]), exercice[Date]&amp;gt;=dateweight)&lt;/P&gt;</description>
      <pubDate>Sun, 29 May 2022 21:14:06 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Creating-a-calculated-measurement-with-data-from-different/m-p/2546134#M71931</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-05-29T21:14:06Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a calculated measurement with data from different tables and days</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Creating-a-calculated-measurement-with-data-from-different/m-p/2546141#M71933</link>
      <description>&lt;P&gt;I ran it and it is giving me the date from which the most recent bodyweight is. The date is accurate, I need the actual bodyweight. Here was my dax formula:&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Most Recent Body Mass = &lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN&gt;var&lt;/SPAN&gt; &lt;SPAN&gt;dateweight&lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt;&lt;SPAN&gt;selectedvalue&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;SPARTA_SCANS2[Date]&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN&gt;return&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN&gt;calculate&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;min&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;TESTS[Date]&lt;/SPAN&gt;&lt;SPAN&gt;), &lt;/SPAN&gt;&lt;SPAN&gt;TESTS[Date]&lt;/SPAN&gt;&lt;SPAN&gt;&amp;gt;=&lt;/SPAN&gt;&lt;SPAN&gt;dateweight&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 29 May 2022 21:29:55 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Creating-a-calculated-measurement-with-data-from-different/m-p/2546141#M71933</guid>
      <dc:creator>drivas771994</dc:creator>
      <dc:date>2022-05-29T21:29:55Z</dc:date>
    </item>
  </channel>
</rss>

