<?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 Improving Dax Query Performance in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Improving-Dax-Query-Performance/m-p/3104172#M109271</link>
    <description>&lt;P&gt;Hi all,&lt;BR /&gt;&lt;BR /&gt;I am looking to improve query performance. The report measures employee activity in a software, showing how many times someone "posted". I have a few lengthy measures in this report which are probably causing the visual on the right to be slow or even overflow. I have tried to clean it up a bit, but it is still pretty slow according to the Performance Analyzer. I would welcome any ideas here! I have attached the .pbix below.&lt;BR /&gt;&lt;BR /&gt;Thanks!&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;- &lt;EM&gt;170/243/8 refer to employee codes&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;A href="https://drive.google.com/file/d/1pQH4V1aSxYVWnQd-QMcmknrwu_ImbQ_5/view?usp=sharing" target="_blank"&gt;https://drive.google.com/file/d/1pQH4V1aSxYVWnQd-QMcmknrwu_ImbQ_5/view?usp=sharing&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 28 Feb 2023 16:13:41 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2023-02-28T16:13:41Z</dc:date>
    <item>
      <title>Improving Dax Query Performance</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Improving-Dax-Query-Performance/m-p/3104172#M109271</link>
      <description>&lt;P&gt;Hi all,&lt;BR /&gt;&lt;BR /&gt;I am looking to improve query performance. The report measures employee activity in a software, showing how many times someone "posted". I have a few lengthy measures in this report which are probably causing the visual on the right to be slow or even overflow. I have tried to clean it up a bit, but it is still pretty slow according to the Performance Analyzer. I would welcome any ideas here! I have attached the .pbix below.&lt;BR /&gt;&lt;BR /&gt;Thanks!&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;- &lt;EM&gt;170/243/8 refer to employee codes&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;A href="https://drive.google.com/file/d/1pQH4V1aSxYVWnQd-QMcmknrwu_ImbQ_5/view?usp=sharing" target="_blank"&gt;https://drive.google.com/file/d/1pQH4V1aSxYVWnQd-QMcmknrwu_ImbQ_5/view?usp=sharing&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 28 Feb 2023 16:13:41 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Improving-Dax-Query-Performance/m-p/3104172#M109271</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-02-28T16:13:41Z</dc:date>
    </item>
    <item>
      <title>Re: Improving Dax Query Performance</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Improving-Dax-Query-Performance/m-p/3105553#M109397</link>
      <description>&lt;P&gt;it seams more efficient to change the measure of Unproductive Time as this&lt;/P&gt;
&lt;LI-CODE lang="cpp"&gt;Unproductive Time2 =
VAR _tbl =
    SUMMARIZE ( 'Audit', Audit[code], Audit[master_key], Audit[trans_date] )
VAR UnproductiveMinutes =
    SUMX (
        _tbl,
        VAR _c = Audit[trans_date]
        VAR _p =
            MAXX ( OFFSET ( -1, _tbl, ORDERBY ( Audit[trans_date] ) ), Audit[trans_date] )
        VAR _min = ( _c - _p ) * 1440
        RETURN
            IF ( _min &amp;gt;= 10 &amp;amp;&amp;amp; FORMAT ( _c, "yyyymmdd" ) = FORMAT ( _p, "yyyymmdd" ), _min )
    )
VAR hourNo =
    INT ( MOD ( UnproductiveMinutes, 1440 ) / 60 )
VAR minuteNO =
    MOD ( MOD ( UnproductiveMinutes, 1440 ), 60 )
VAR secondNo =
    INT ( ( UnproductiveMinutes - INT ( UnproductiveMinutes ) ) * 60 )
RETURN
    IF (
        NOT ISBLANK ( UnproductiveMinutes ),
        FORMAT ( hourNo, "#0" ) &amp;amp; ":"
            &amp;amp; FORMAT ( minuteNO, "#00" ) &amp;amp; ":"
            &amp;amp; FORMAT ( secondNo, "#00" )
    )&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 01 Mar 2023 09:13:57 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Improving-Dax-Query-Performance/m-p/3105553#M109397</guid>
      <dc:creator>wdx223_Daniel</dc:creator>
      <dc:date>2023-03-01T09:13:57Z</dc:date>
    </item>
    <item>
      <title>Re: Improving Dax Query Performance</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Improving-Dax-Query-Performance/m-p/3108803#M109715</link>
      <description>&lt;P&gt;Thank you for this suggestion! It appears to slightly improve performance. Is there any way around a lengthy waiting process just due to the complexity of the measure?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 02 Mar 2023 20:45:36 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Improving-Dax-Query-Performance/m-p/3108803#M109715</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-03-02T20:45:36Z</dc:date>
    </item>
    <item>
      <title>Re: Improving Dax Query Performance</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Improving-Dax-Query-Performance/m-p/3108804#M109716</link>
      <description>&lt;P&gt;Any ideas here? Would welcome any thoughts!&lt;/P&gt;</description>
      <pubDate>Thu, 02 Mar 2023 20:46:08 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Improving-Dax-Query-Performance/m-p/3108804#M109716</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-03-02T20:46:08Z</dc:date>
    </item>
  </channel>
</rss>

