<?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: Return value where date equals the latest date in a selection in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Return-value-where-date-equals-the-latest-date-in-a-selection/m-p/1212002#M19524</link>
    <description>&lt;P&gt;One approach is to use variables, like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="java"&gt;LastVal =
var d = selectedvalue(tcalendar[date])
var qs = (your date math here to identify the first day in the current quarter)
var l = selectedvalue(table[license number])
var ld = calculate (max(date),all(table),table[license number]=l,table[period start date]&amp;lt;qs)
return calculate(sum(table[Accrued income for quarter]),all(table),table[license number]=l,table[period start date]=ld)&lt;/LI-CODE&gt;</description>
    <pubDate>Thu, 09 Jul 2020 13:30:56 GMT</pubDate>
    <dc:creator>lbendlin</dc:creator>
    <dc:date>2020-07-09T13:30:56Z</dc:date>
    <item>
      <title>Return value where date equals the latest date in a selection</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Return-value-where-date-equals-the-latest-date-in-a-selection/m-p/1211899#M19514</link>
      <description>&lt;P&gt;Hi all,&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I can't figure out how to write a column/measure that would get me the correct response.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Every month, a estimate for accrual income for quarter is logged per Licensee Number.&amp;nbsp;&lt;BR /&gt;Every quarter, the estimate from the latest month needs to be compared to other stuff. (so the estimate of month 3, 6, 9, 12), but I have issues extracting this estimate.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;In this case, for Q2 the required value would be 2600000, because it is the latest value logged in the quarter.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How do I write a measure that would show me the correct estimate but maintains date and licensee number filtering?&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I have tried this:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But that results in a table instead of a value.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Can anyone help me out?&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Cheers&lt;/P&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;</description>
      <pubDate>Thu, 09 Jul 2020 12:37:30 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Return-value-where-date-equals-the-latest-date-in-a-selection/m-p/1211899#M19514</guid>
      <dc:creator>XanderDLW</dc:creator>
      <dc:date>2020-07-09T12:37:30Z</dc:date>
    </item>
    <item>
      <title>Re: Return value where date equals the latest date in a selection</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Return-value-where-date-equals-the-latest-date-in-a-selection/m-p/1212002#M19524</link>
      <description>&lt;P&gt;One approach is to use variables, like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="java"&gt;LastVal =
var d = selectedvalue(tcalendar[date])
var qs = (your date math here to identify the first day in the current quarter)
var l = selectedvalue(table[license number])
var ld = calculate (max(date),all(table),table[license number]=l,table[period start date]&amp;lt;qs)
return calculate(sum(table[Accrued income for quarter]),all(table),table[license number]=l,table[period start date]=ld)&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 09 Jul 2020 13:30:56 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Return-value-where-date-equals-the-latest-date-in-a-selection/m-p/1212002#M19524</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2020-07-09T13:30:56Z</dc:date>
    </item>
    <item>
      <title>Re: Return value where date equals the latest date in a selection</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Return-value-where-date-equals-the-latest-date-in-a-selection/m-p/1275638#M21599</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="244768" data-lia-user-login="XanderDLW" class="lia-mention lia-mention-user"&gt;XanderDLW&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;do you still have issues with this?&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Cheers,&lt;BR /&gt;Sturla&lt;/P&gt;</description>
      <pubDate>Wed, 05 Aug 2020 20:09:06 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Return-value-where-date-equals-the-latest-date-in-a-selection/m-p/1275638#M21599</guid>
      <dc:creator>sturlaws</dc:creator>
      <dc:date>2020-08-05T20:09:06Z</dc:date>
    </item>
  </channel>
</rss>

