<?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: DAX Query needs optimiziation in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Query-needs-optimiziation/m-p/2908634#M94981</link>
    <description>&lt;P&gt;Why not use Power Query to generate this table? DAX is not a mashup tool. It's an analytical tool. Power Query is for mashup.&lt;/P&gt;</description>
    <pubDate>Wed, 16 Nov 2022 08:03:59 GMT</pubDate>
    <dc:creator>daXtreme</dc:creator>
    <dc:date>2022-11-16T08:03:59Z</dc:date>
    <item>
      <title>DAX Query needs optimiziation</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Query-needs-optimiziation/m-p/2907997#M94933</link>
      <description>&lt;P&gt;Hello all!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm making an Azure Table Cube access by DAX query in import mode from a telemetry level from several clients tanks.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is a simple table, but very heavy (thousands of clients, sometimes 15 minutes based information, and I can't ensure that all the timestamps will be equal). I only need a simple table in which has the last level from the day for each client.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So, 4 columns are available in this cube: LevelDate, LevelDateTime, DPLevel(%) and DeliveryPointId&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;LevelDate | LevelDateTime | DPLevel(%) | DeliveryPointId&lt;/P&gt;&lt;P&gt;4/11/22&amp;nbsp; | 4/11/22 23:00 | 56 | 4466 |&lt;/P&gt;&lt;P&gt;4/11/22&amp;nbsp; | 4/11/22 23:30 | 55 | 4466 |&lt;/P&gt;&lt;P&gt;5/11/22&amp;nbsp; | 5/11/22 00:15 | 54 | 4466 |&lt;/P&gt;&lt;P&gt;5/11/22&amp;nbsp; | 5/11/22 00:30 | 53 | 4466 |&lt;/P&gt;&lt;P&gt;4/11/22&amp;nbsp; | 4/11/22 23:00 | 78 | 4467 |&lt;/P&gt;&lt;P&gt;5/11/22&amp;nbsp; | 5/11/22 00:00 | 77 | 4467 |&lt;/P&gt;&lt;P&gt;5/11/22&amp;nbsp; | 5/11/22 00:15 | 76 | 4467 |&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to generate something like this, in order to improve performance (1 value for each day for each delivery point):&lt;/P&gt;&lt;P&gt;LevelDate | Last Level (%) | DeliveryPointId&lt;/P&gt;&lt;P&gt;4/11/22&amp;nbsp; | 55 | 4466 |&lt;/P&gt;&lt;P&gt;5/11/22&amp;nbsp; | 53 | 4466 |&lt;/P&gt;&lt;P&gt;4/11/22&amp;nbsp; | 78 | 4467 |&lt;/P&gt;&lt;P&gt;5/11/22&amp;nbsp; | 76 | 4467 |&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've tried to create a measure in the definitions that retrieves the value for the last datetime for the context, and creating a summarizecolumns for each date and delivery point id (that's the client id), and the logic worked (see below). However, it doesn't bring any value if I try filtering for periods longer than one week, and looks like the search for the last datetime stamp is very heavy in the lastnonblankvalue measure.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Given this structure, do you see any better way to generate this table?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;DEFINE&lt;BR /&gt;MEASURE 'DPLevel'[LastLevel(%)] = LASTNONBLANKVALUE('DPLevel'[LevelDateTime],SELECTEDVALUE('DPLevel'[DPLevel(%)]))&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Evaluate&lt;BR /&gt;SUMMARIZECOLUMNS (&lt;BR /&gt;'DPLevel'[LevelDate],&lt;BR /&gt;'DPLevel'[DeliveryPointId],&lt;BR /&gt;FILTER('DPLevel','DPLevel'[LevelDate]&amp;gt;=DATE(2022,1,1)),&lt;BR /&gt;"Last Level (%)", [LastLevel(%)]&lt;BR /&gt;&lt;BR /&gt;)&lt;/P&gt;</description>
      <pubDate>Wed, 16 Nov 2022 00:41:56 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Query-needs-optimiziation/m-p/2907997#M94933</guid>
      <dc:creator>renanvg7</dc:creator>
      <dc:date>2022-11-16T00:41:56Z</dc:date>
    </item>
    <item>
      <title>Re: DAX Query needs optimiziation</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Query-needs-optimiziation/m-p/2908075#M94940</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="457929" data-lia-user-login="renanvg7" class="lia-mention lia-mention-user"&gt;renanvg7&lt;/a&gt; , refer to my way of getting the latest value, if that can help&lt;/P&gt;
&lt;P&gt;Latest &lt;BR /&gt;&lt;A href="https://amitchandak.medium.com/power-bi-get-the-last-latest-value-of-a-category-d0cf2fcf92d0" target="_blank"&gt;https://amitchandak.medium.com/power-bi-get-the-last-latest-value-of-a-category-d0cf2fcf92d0&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://amitchandak.medium.com/power-bi-get-the-sum-of-the-last-latest-value-of-a-category-f1c839ee884e" target="_blank"&gt;https://amitchandak.medium.com/power-bi-get-the-sum-of-the-last-latest-value-of-a-category-f1c839ee884e&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 16 Nov 2022 02:26:35 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Query-needs-optimiziation/m-p/2908075#M94940</guid>
      <dc:creator>amitchandak</dc:creator>
      <dc:date>2022-11-16T02:26:35Z</dc:date>
    </item>
    <item>
      <title>Re: DAX Query needs optimiziation</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Query-needs-optimiziation/m-p/2908634#M94981</link>
      <description>&lt;P&gt;Why not use Power Query to generate this table? DAX is not a mashup tool. It's an analytical tool. Power Query is for mashup.&lt;/P&gt;</description>
      <pubDate>Wed, 16 Nov 2022 08:03:59 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Query-needs-optimiziation/m-p/2908634#M94981</guid>
      <dc:creator>daXtreme</dc:creator>
      <dc:date>2022-11-16T08:03:59Z</dc:date>
    </item>
  </channel>
</rss>

