<?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: Performance issue while a report start in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Performance-issue-while-a-report-start/m-p/2593502#M74774</link>
    <description>&lt;P&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif"&gt;Hi&amp;nbsp;Anonymous&lt;/LI-USER&gt;,&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif"&gt;Perhaps you can try to use the following measure formula to calculate results without summary across multiple tables:&lt;/FONT&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;formula =
VAR currProduct =
    VALUES ( DimProduct[Product_id] )
VAR saleList =
    CALCULATETABLE (
        VALUES ( Sales[InvoiceID] ),
        FILTER ( ALLSELECTED ( Sales ), Sales[Product_id] IN currProduct )
    )
VAR forcastList =
    CALCULATETABLE (
        VALUES ( Forecast[InvoiceID] ),
        FILTER ( ALLSELECTED ( Forecast ), Forecast[Product_id] IN currProduct )
    )
RETURN
    CALCULATE (
        COUNTROWS ( VALUES ( Invoice[CustoID] ) ),
        FILTER (
            ALLSELECTED ( Invoice ),
            [InvoiceID] IN INTERSECT ( saleList, forcastList )
        )
    )&lt;/LI-CODE&gt;
&lt;P&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif"&gt;Regards,&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif"&gt;Xiaoxin Sheng&lt;/FONT&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 22 Jun 2022 01:53:27 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2022-06-22T01:53:27Z</dc:date>
    <item>
      <title>Performance issue while a report start</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Performance-issue-while-a-report-start/m-p/2578697#M73922</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I have a report with live connection (ssas tabular) i'm facing an issue when i start the report as some calculaction up to 50 seconds to show up.&lt;/P&gt;&lt;P&gt;I did the performance analyzer on power bi and it seems like the issue is caused by the bellow dax calculation :&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="php"&gt;CALCULATE (
    [Cnt],
     SUMMARIZE (
        Sales,
        DimProduct[Product_id]
    )
    ,SUMMARIZE (
        Forecast,
        DimProduct[Product_id]
    )
)&lt;/LI-CODE&gt;&lt;P&gt;&lt;SPAN&gt;The definition of the measure Cnt like as bellow :&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="php"&gt;Cnt :=  DISTINCTCOUNT ( Invoice[CustoID] )&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Could you please advise me on what can be the issue with the calculation and if there is any alternative for the Summarize function ?&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Thanks for help !!&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 14 Jun 2022 22:25:43 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Performance-issue-while-a-report-start/m-p/2578697#M73922</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-06-14T22:25:43Z</dc:date>
    </item>
    <item>
      <title>Re: Performance issue while a report start</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Performance-issue-while-a-report-start/m-p/2580994#M74048</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;- I am trying to understand the business requirement for the measure.&amp;nbsp; It appears that you want the Number of Unique Customers which who brought products that appear in the Sales and Forecast table?&amp;nbsp; Your approach to calculating this will not be performant because the distinctcount function will require a complete table scan and this after performing a complete table scan on Sales and Forecast.&amp;nbsp; If you use Dax Studio to analyse the DAX Query obtained from performance analyser, you will see lots of SE Queries and FE processing.&amp;nbsp; To help further, I would need to see the Data Model and some sample data.&amp;nbsp; Is it possible to provide a link to a PBIX?&lt;/P&gt;</description>
      <pubDate>Wed, 15 Jun 2022 17:08:43 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Performance-issue-while-a-report-start/m-p/2580994#M74048</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-06-15T17:08:43Z</dc:date>
    </item>
    <item>
      <title>Re: Performance issue while a report start</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Performance-issue-while-a-report-start/m-p/2581197#M74063</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for the reply.&lt;/P&gt;&lt;P&gt;yes i did the troubleshooting with Dax studio and i confirm that i have a lot of&amp;nbsp;&lt;SPAN&gt;&amp;nbsp;of SE Queries and FE processing.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;This the reason why i share the question , to have some recommendation to improve that .&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Yes you are right for the business requirement.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 15 Jun 2022 18:56:14 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Performance-issue-while-a-report-start/m-p/2581197#M74063</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-06-15T18:56:14Z</dc:date>
    </item>
    <item>
      <title>Re: Performance issue while a report start</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Performance-issue-while-a-report-start/m-p/2581233#M74065</link>
      <description>&lt;P&gt;Anonymous&lt;/LI-USER&gt;&amp;nbsp;- It would help to see the data model.&amp;nbsp; I am thinking the Invoice table has Bidirectional Relationships with Sales and Forecast - another performance no no.&amp;nbsp; Here is what I am thinking.&amp;nbsp; If you create VAR to find the Sales and Forecast products, then Join tables to find the Distinct Customer ID.&amp;nbsp; This would look something like this:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;PRE&gt;Distinct Customers Count for Sales &amp;amp; Forecast Products = &lt;BR /&gt;VAR _sales = SUMMARIZECOLUMNS( Product[Product_id] , Invoice[CustoID] , "Sum" , Sales[Amount] )&lt;BR /&gt;VAR _forecast = SUMMARIZECOLUMNS( Product[Product_id], "Sum" , Sales[Amount] )&lt;BR /&gt;VAR _Join = NATURALINNERJOIN ( _sales , _forecast )&lt;BR /&gt;VAR&amp;nbsp;_Customers&amp;nbsp;=&amp;nbsp;SELECTCOLUMN( _Join&amp;nbsp;,&amp;nbsp;"Customers"&amp;nbsp;, Invoice[CustoID]&amp;nbsp;)&lt;BR /&gt;RETURN&lt;BR /&gt;COUNTROWS ( DISTINCT ( _Customers&amp;nbsp;) )&lt;BR /&gt;&lt;BR /&gt;&lt;/PRE&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;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 15 Jun 2022 19:20:11 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Performance-issue-while-a-report-start/m-p/2581233#M74065</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-06-15T19:20:11Z</dc:date>
    </item>
    <item>
      <title>Re: Performance issue while a report start</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Performance-issue-while-a-report-start/m-p/2581261#M74068</link>
      <description>&lt;P&gt;Anonymous&lt;/LI-USER&gt;&amp;nbsp; i can do it in private , i will send you a message&lt;/P&gt;</description>
      <pubDate>Wed, 15 Jun 2022 19:44:10 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Performance-issue-while-a-report-start/m-p/2581261#M74068</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-06-15T19:44:10Z</dc:date>
    </item>
    <item>
      <title>Re: Performance issue while a report start</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Performance-issue-while-a-report-start/m-p/2593502#M74774</link>
      <description>&lt;P&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif"&gt;Hi&amp;nbsp;Anonymous&lt;/LI-USER&gt;,&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif"&gt;Perhaps you can try to use the following measure formula to calculate results without summary across multiple tables:&lt;/FONT&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;formula =
VAR currProduct =
    VALUES ( DimProduct[Product_id] )
VAR saleList =
    CALCULATETABLE (
        VALUES ( Sales[InvoiceID] ),
        FILTER ( ALLSELECTED ( Sales ), Sales[Product_id] IN currProduct )
    )
VAR forcastList =
    CALCULATETABLE (
        VALUES ( Forecast[InvoiceID] ),
        FILTER ( ALLSELECTED ( Forecast ), Forecast[Product_id] IN currProduct )
    )
RETURN
    CALCULATE (
        COUNTROWS ( VALUES ( Invoice[CustoID] ) ),
        FILTER (
            ALLSELECTED ( Invoice ),
            [InvoiceID] IN INTERSECT ( saleList, forcastList )
        )
    )&lt;/LI-CODE&gt;
&lt;P&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif"&gt;Regards,&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif"&gt;Xiaoxin Sheng&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 22 Jun 2022 01:53:27 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Performance-issue-while-a-report-start/m-p/2593502#M74774</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-06-22T01:53:27Z</dc:date>
    </item>
  </channel>
</rss>

