<?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: Calculated Table in Desktop</title>
    <link>https://community.fabric.microsoft.com/t5/Desktop/Calculated-Table/m-p/967990#M463585</link>
    <description>&lt;P&gt;What is the role of second table&lt;/P&gt;
&lt;P&gt;Try like&lt;/P&gt;
&lt;P&gt;Measure = &lt;BR /&gt;VAR __id = MAX ( 'Table'[country] )&lt;BR /&gt;VAR __date = CALCULATE ( MAX( 'Table'[date] ), ALLSELECTED ( 'Table' ), 'Table'[country] = __id ) &lt;BR /&gt;RETURN CALCULATE ( max ( 'Table'[rate] ), VALUES ( 'Table'[country] ), 'Table'[country] = __id, 'Table'[date] = __date )&lt;/P&gt;
&lt;P class="ics-element-donot-delete 1001_CC@"&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 11 Mar 2020 04:36:16 GMT</pubDate>
    <dc:creator>amitchandak</dc:creator>
    <dc:date>2020-03-11T04:36:16Z</dc:date>
    <item>
      <title>Calculated Table</title>
      <link>https://community.fabric.microsoft.com/t5/Desktop/Calculated-Table/m-p/967937#M463562</link>
      <description>&lt;P&gt;Hi, I need help creating a calculated table. Here is the scenario -&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The requirement is to create a calculated table based the columns from 2 tables based on selection for the latest date from the second table.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Table 1 -&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;country&lt;/TD&gt;&lt;TD&gt;rate&lt;/TD&gt;&lt;TD&gt;date&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;MX&lt;/TD&gt;&lt;TD&gt;.5&lt;/TD&gt;&lt;TD&gt;03/10/2020&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;MX&lt;/TD&gt;&lt;TD&gt;.8&lt;/TD&gt;&lt;TD&gt;03/11/2020&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;US&lt;/TD&gt;&lt;TD&gt;.7&lt;/TD&gt;&lt;TD&gt;03/10/2020&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;US&lt;/TD&gt;&lt;TD&gt;.9&lt;/TD&gt;&lt;TD&gt;03/11/2020&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Table 2-&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;date&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;03/11/2020&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;03/10/2020&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is the expected result table.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;country&lt;/TD&gt;&lt;TD&gt;rate&lt;/TD&gt;&lt;TD&gt;date&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;MX&lt;/TD&gt;&lt;TD&gt;.8&lt;/TD&gt;&lt;TD&gt;03/11/2020&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;US&lt;/TD&gt;&lt;TD&gt;.9&lt;/TD&gt;&lt;TD&gt;03/11/2020&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for the help in advance.&amp;nbsp;&lt;/P&gt;&lt;P class="ics-element-donot-delete 1001_CC@"&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 11 Mar 2020 03:40:48 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Desktop/Calculated-Table/m-p/967937#M463562</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-03-11T03:40:48Z</dc:date>
    </item>
    <item>
      <title>Re: Calculated Table</title>
      <link>https://community.fabric.microsoft.com/t5/Desktop/Calculated-Table/m-p/967990#M463585</link>
      <description>&lt;P&gt;What is the role of second table&lt;/P&gt;
&lt;P&gt;Try like&lt;/P&gt;
&lt;P&gt;Measure = &lt;BR /&gt;VAR __id = MAX ( 'Table'[country] )&lt;BR /&gt;VAR __date = CALCULATE ( MAX( 'Table'[date] ), ALLSELECTED ( 'Table' ), 'Table'[country] = __id ) &lt;BR /&gt;RETURN CALCULATE ( max ( 'Table'[rate] ), VALUES ( 'Table'[country] ), 'Table'[country] = __id, 'Table'[date] = __date )&lt;/P&gt;
&lt;P class="ics-element-donot-delete 1001_CC@"&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 11 Mar 2020 04:36:16 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Desktop/Calculated-Table/m-p/967990#M463585</guid>
      <dc:creator>amitchandak</dc:creator>
      <dc:date>2020-03-11T04:36:16Z</dc:date>
    </item>
    <item>
      <title>Re: Calculated Table</title>
      <link>https://community.fabric.microsoft.com/t5/Desktop/Calculated-Table/m-p/968212#M463663</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please try to create this measure:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Measure = IF(MAX('Table 1'[date])=MAX('Table 2'[date]),1,0)&lt;/LI-CODE&gt;&lt;P&gt;Then apply it to the table1 visual, the result shows:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;Or if you want to generate a new table, please try this:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Table = FILTER(SELECTCOLUMNS('Table 1',"country",'Table 1'[country],"rate",'Table 1'[rate],"date",'Table 1'[date]),[Measure]=1)&lt;/LI-CODE&gt;&lt;P&gt;The result shows:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;Tips: All above two ways do not need to create any relationship among tables.&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;Here is my test pbix file:&lt;/P&gt;&lt;P&gt;&lt;A href="https://microsoftapc-my.sharepoint.com/:u:/g/personal/v-gizhi_microsoft_com/EXbRAFbRs9VHgrzBpYDuJ3MB_5A1SdBQXs7XXcOzmUckvg?e=ZUjASe" target="_self"&gt;pbix&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope this can help.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Giotto Zhi&lt;/P&gt;&lt;P class="ics-element-donot-delete 1001_CC@"&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 11 Mar 2020 06:51:54 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Desktop/Calculated-Table/m-p/968212#M463663</guid>
      <dc:creator>v-gizhi-msft</dc:creator>
      <dc:date>2020-03-11T06:51:54Z</dc:date>
    </item>
    <item>
      <title>Re: Calculated Table</title>
      <link>https://community.fabric.microsoft.com/t5/Desktop/Calculated-Table/m-p/968282#M463689</link>
      <description>&lt;P&gt;The second table will have only one value ..My mistake.&lt;/P&gt;&lt;P&gt;Basically, select coulmns/records from table1 based on &lt;U&gt;&lt;STRONG&gt;one date&lt;/STRONG&gt;&lt;/U&gt; from table 2&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Table2-&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;date&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;03/11/2020&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Does is change how we implement the DAX?&amp;nbsp;&lt;/P&gt;&lt;P class="ics-element-donot-delete 1001_CC@"&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 11 Mar 2020 07:27:18 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Desktop/Calculated-Table/m-p/968282#M463689</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-03-11T07:27:18Z</dc:date>
    </item>
    <item>
      <title>Re: Calculated Table</title>
      <link>https://community.fabric.microsoft.com/t5/Desktop/Calculated-Table/m-p/968440#M463762</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Do you mean that the table 2 has more than one date, and when you choose one date in table2[date] slicer, it will show the expected result you posted？&lt;/P&gt;&lt;P&gt;If so, please try this measure:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Measure = IF(MAX('Table 1'[date])=SELECTEDVALUE('Table 2'[Date]),1,0)&lt;/LI-CODE&gt;&lt;P&gt;Apply this measure to the visual, when you select one date in slicer, it shows:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;If you only have one date in your initial table 2, the first way in my original reply can solve it.&lt;/P&gt;&lt;P&gt;If you still have any issue, please for free to let me know.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Giotto Zhi&lt;/P&gt;&lt;P class="ics-element-donot-delete 1001_CC@"&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 11 Mar 2020 08:23:21 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Desktop/Calculated-Table/m-p/968440#M463762</guid>
      <dc:creator>v-gizhi-msft</dc:creator>
      <dc:date>2020-03-11T08:23:21Z</dc:date>
    </item>
    <item>
      <title>Re: Calculated Table</title>
      <link>https://community.fabric.microsoft.com/t5/Desktop/Calculated-Table/m-p/968792#M463906</link>
      <description>&lt;P&gt;Zhi, Thank you for your feedback so far.&amp;nbsp;&lt;/P&gt;&lt;P&gt;There is a small change .I should have been more specific from the begining.&lt;/P&gt;&lt;P&gt;We are taking the MAX of date from Table 1 but what if we have a pick a date that is &lt;STRONG&gt;&lt;U&gt;not the MAX&lt;/U&gt;&lt;/STRONG&gt; but is equal to the date from the Table 2.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Table 1 -&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;country&lt;/TD&gt;&lt;TD&gt;rate&lt;/TD&gt;&lt;TD&gt;date&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;MX&lt;/TD&gt;&lt;TD&gt;.5&lt;/TD&gt;&lt;TD&gt;03/10/2020&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;MX&lt;/TD&gt;&lt;TD&gt;.8&lt;/TD&gt;&lt;TD&gt;03/11/2020&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;US&lt;/TD&gt;&lt;TD&gt;.7&lt;/TD&gt;&lt;TD&gt;03/10/2020&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;US&lt;/TD&gt;&lt;TD&gt;.9&lt;/TD&gt;&lt;TD&gt;03/11/2020&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;MX&lt;/TD&gt;&lt;TD&gt;.8&lt;/TD&gt;&lt;TD&gt;03/20/2020&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;US&lt;/TD&gt;&lt;TD&gt;.7&lt;/TD&gt;&lt;TD&gt;03/20/2020&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Table 2&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Date&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;03/11/2020&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Result Table -&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;country&lt;/TD&gt;&lt;TD&gt;rate&lt;/TD&gt;&lt;TD&gt;date&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;US&lt;/TD&gt;&lt;TD&gt;.9&lt;/TD&gt;&lt;TD&gt;03/11/2020&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;MX&lt;/TD&gt;&lt;TD&gt;.8&lt;/TD&gt;&lt;TD&gt;03/11/2020&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P class="ics-element-donot-delete 1001_CC@"&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 11 Mar 2020 10:44:03 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Desktop/Calculated-Table/m-p/968792#M463906</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-03-11T10:44:03Z</dc:date>
    </item>
    <item>
      <title>Re: Calculated Table</title>
      <link>https://community.fabric.microsoft.com/t5/Desktop/Calculated-Table/m-p/968864#M463933</link>
      <description>&lt;P&gt;bumping up..&lt;/P&gt;&lt;P class="ics-element-donot-delete 1001_CC@"&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 11 Mar 2020 11:24:01 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Desktop/Calculated-Table/m-p/968864#M463933</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-03-11T11:24:01Z</dc:date>
    </item>
    <item>
      <title>Re: Calculated Table</title>
      <link>https://community.fabric.microsoft.com/t5/Desktop/Calculated-Table/m-p/968947#M463964</link>
      <description>&lt;P&gt;Bumping up..&lt;/P&gt;&lt;P class="ics-element-donot-delete 1001_CC@"&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 11 Mar 2020 12:22:16 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Desktop/Calculated-Table/m-p/968947#M463964</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-03-11T12:22:16Z</dc:date>
    </item>
    <item>
      <title>Re: Calculated Table</title>
      <link>https://community.fabric.microsoft.com/t5/Desktop/Calculated-Table/m-p/968978#M463974</link>
      <description>&lt;P&gt;Anonymous&lt;/LI-USER&gt; ,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This should do&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Max Rate =
var _max =maxx(Table2,Table2[Date])
return
calculate(max(Table1[Rate]), table1[Date]=_max)
&lt;/LI-CODE&gt;
&lt;P&gt;&lt;STRONG&gt;Appreciate your Kudos.&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please mark one or more user @ from whom you are looking for an answer. That comes in mail notification as mention. &lt;BR /&gt;&lt;/P&gt;
&lt;P class="ics-element-donot-delete 1001_CC@"&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 11 Mar 2020 12:40:37 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Desktop/Calculated-Table/m-p/968978#M463974</guid>
      <dc:creator>amitchandak</dc:creator>
      <dc:date>2020-03-11T12:40:37Z</dc:date>
    </item>
    <item>
      <title>Re: Calculated Table</title>
      <link>https://community.fabric.microsoft.com/t5/Desktop/Calculated-Table/m-p/970022#M464396</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;According to your further description, i create a seperate date slicer table:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;Then try this measure:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Measure = IF(MAXX(ALL('Table 1'),'Table 1'[date])&amp;lt;&amp;gt;SELECTEDVALUE('Date Slicer'[Date]),IF(MAX('Table 1'[date])=MAX('Table 2'[Date]),1,0),IF(MAX('Table 1'[date])=SELECTEDVALUE('Date Slicer'[Date]),1,0))&lt;/LI-CODE&gt;&lt;P&gt;Apply this measure to the table1, when you choose the max date in table1, it shows the max date's data:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;When you choose other date which is not equal to the max date in table1, it shows the data with table1[date]=table2[date]:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;Here is my test pbix file:&lt;/P&gt;&lt;P&gt;&lt;A href="https://microsoftapc-my.sharepoint.com/:u:/g/personal/v-gizhi_microsoft_com/EXbRAFbRs9VHgrzBpYDuJ3MB_5A1SdBQXs7XXcOzmUckvg?e=iDFzaQ" target="_self"&gt;pbix&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Expect your reply!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Giotto Zhi&lt;/P&gt;&lt;P class="ics-element-donot-delete 1001_CC@"&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 12 Mar 2020 02:32:00 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Desktop/Calculated-Table/m-p/970022#M464396</guid>
      <dc:creator>v-gizhi-msft</dc:creator>
      <dc:date>2020-03-12T02:32:00Z</dc:date>
    </item>
    <item>
      <title>Re: Calculated Table</title>
      <link>https://community.fabric.microsoft.com/t5/Desktop/Calculated-Table/m-p/993575#M472672</link>
      <description>&lt;P&gt;Thank you!&lt;/P&gt;</description>
      <pubDate>Thu, 26 Mar 2020 15:09:56 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Desktop/Calculated-Table/m-p/993575#M472672</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-03-26T15:09:56Z</dc:date>
    </item>
  </channel>
</rss>

