<?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: NEED HELP : Calculated Column refreshes rather slowly and occasionally experiences memory problems. in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/NEED-HELP-Calculated-Column-refreshes-rather-slowly-and/m-p/2686434#M80709</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="317289" data-lia-user-login="tamerj1" class="lia-mention lia-mention-user"&gt;tamerj1&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Due to model difficulties, the case table doesn't have a [Reported Date] column and we are unable to establish active relationships between these tables, thus I am saving [Reported Date] in that variable using the LOOKUPVALUE function based on the ID column.&lt;/P&gt;&lt;P&gt;Yes&amp;nbsp;&lt;SPAN&gt;there is only one date for each id in the header table&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Header table is DIM table and case table is fact&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 08 Aug 2022 06:56:51 GMT</pubDate>
    <dc:creator>Venkateswara_ra</dc:creator>
    <dc:date>2022-08-08T06:56:51Z</dc:date>
    <item>
      <title>NEED HELP : Calculated Column refreshes rather slowly and occasionally experiences memory problems.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/NEED-HELP-Calculated-Column-refreshes-rather-slowly-and/m-p/2685657#M80638</link>
      <description>&lt;P&gt;In my AAS Cube (Live connection to BI), I constructed a calculated column, however the calculated column is taking too long.&lt;/P&gt;&lt;P&gt;This is the query that I tried to optimise in the end.&lt;/P&gt;&lt;P&gt;What is wrong with my query , please?&lt;/P&gt;&lt;P&gt;I have used 2 tables in&amp;nbsp;calculated column&lt;/P&gt;&lt;P&gt;One is Case table and another is&amp;nbsp; header table&amp;nbsp;&lt;/P&gt;&lt;P&gt;Rowcount of case table is =&amp;nbsp;3819718&lt;/P&gt;&lt;P&gt;Rowcount of header table is =&amp;nbsp;12957845&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;calculated column =&lt;BR /&gt;VAR ID = Case[Id]&lt;BR /&gt;VAR Type = Case[Type]&lt;BR /&gt;VAR CreationDate = Case[Creation Date]&lt;BR /&gt;VAR LastModified = Case[Last Modified On Date]&lt;BR /&gt;VAR FNOL =&lt;BR /&gt;LOOKUPVALUE(&lt;BR /&gt;'Header'[Reported Date],&lt;BR /&gt;'Header'[id], ID&lt;BR /&gt;)&lt;BR /&gt;RETURN&lt;BR /&gt;SWITCH(&lt;BR /&gt;TRUE(),&lt;BR /&gt;Type&lt;BR /&gt;IN {&lt;BR /&gt;"Absent",&lt;BR /&gt;"Leave"&lt;BR /&gt;},&lt;BR /&gt;CALCULATE(&lt;BR /&gt;SUM( Date[Work] ),&lt;BR /&gt;Date[Date] &amp;gt;= CreationDate&lt;BR /&gt;&amp;amp;&amp;amp; Date[Date] &amp;lt;= LastModified&lt;BR /&gt;),&lt;BR /&gt;Type = "Present",&lt;BR /&gt;CALCULATE(&lt;BR /&gt;SUM( Date[Work] ),&lt;BR /&gt;Date[Date] &amp;gt;= FNOL&lt;BR /&gt;&amp;amp;&amp;amp; Date[Date] &amp;lt;= LastModified&lt;BR /&gt;),&lt;BR /&gt;BLANK()&lt;BR /&gt;)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 07 Aug 2022 17:06:40 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/NEED-HELP-Calculated-Column-refreshes-rather-slowly-and/m-p/2685657#M80638</guid>
      <dc:creator>Venkateswara_ra</dc:creator>
      <dc:date>2022-08-07T17:06:40Z</dc:date>
    </item>
    <item>
      <title>Re: NEED HELP : Calculated Column refreshes rather slowly and occasionally experiences memory problems.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/NEED-HELP-Calculated-Column-refreshes-rather-slowly-and/m-p/2685728#M80654</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="237066" data-lia-user-login="Venkateswara_ra" class="lia-mention lia-mention-user"&gt;Venkateswara_ra&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;what does this variable supposed to calculate:&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;VAR FNOL =&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;LOOKUPVALUE(&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;'Header'[Reported Date],&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;'Header'[id], ID&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;becuase if there is only one date for each id then it is the date of the current row. Please clarify this point&lt;/P&gt;</description>
      <pubDate>Sun, 07 Aug 2022 19:49:56 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/NEED-HELP-Calculated-Column-refreshes-rather-slowly-and/m-p/2685728#M80654</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2022-08-07T19:49:56Z</dc:date>
    </item>
    <item>
      <title>Re: NEED HELP : Calculated Column refreshes rather slowly and occasionally experiences memory problems.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/NEED-HELP-Calculated-Column-refreshes-rather-slowly-and/m-p/2686434#M80709</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="317289" data-lia-user-login="tamerj1" class="lia-mention lia-mention-user"&gt;tamerj1&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Due to model difficulties, the case table doesn't have a [Reported Date] column and we are unable to establish active relationships between these tables, thus I am saving [Reported Date] in that variable using the LOOKUPVALUE function based on the ID column.&lt;/P&gt;&lt;P&gt;Yes&amp;nbsp;&lt;SPAN&gt;there is only one date for each id in the header table&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Header table is DIM table and case table is fact&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 08 Aug 2022 06:56:51 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/NEED-HELP-Calculated-Column-refreshes-rather-slowly-and/m-p/2686434#M80709</guid>
      <dc:creator>Venkateswara_ra</dc:creator>
      <dc:date>2022-08-08T06:56:51Z</dc:date>
    </item>
    <item>
      <title>Re: NEED HELP : Calculated Column refreshes rather slowly and occasionally experiences memory problems.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/NEED-HELP-Calculated-Column-refreshes-rather-slowly-and/m-p/2686468#M80711</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="237066" data-lia-user-login="Venkateswara_ra" class="lia-mention lia-mention-user"&gt;Venkateswara_ra&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;I don't see much to be done here. If what you call in you code 'Date' is just a date table then this should be super fast as the date table is a very small table. It could be the LOOKUPVALUE which causing the problem. So I suggest to tray with TREATAS. Please try&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;calculated column =
VAR ID = Case[Id]
VAR Type = Case[Type]
VAR CreationDate = Case[Creation Date]
VAR LastModified = Case[Last Modified On Date]
VAR FNOL =
    CALCULATE (
        SELECTEDVALUE ( 'Header'[Reported Date] ),
        TREATAS ( { ID }, 'Header'[id] )
    )
VAR DateWork =
    FILTER ( 'Date', 'Date'[Date] &amp;lt;= LastModified )
RETURN
    SWITCH (
        TRUE (),
        Type IN { "Absent", "Leave" }, SUMX ( FILTER ( DateWork, 'Date'[Date] &amp;gt;= CreationDate ), 'Date'[Work] ),
        Type = "Present", SUMX ( FILTER ( DateWork, 'Date'[Date] &amp;gt;= FNOL ), 'Date'[Work] )
    )&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 08 Aug 2022 07:13:46 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/NEED-HELP-Calculated-Column-refreshes-rather-slowly-and/m-p/2686468#M80711</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2022-08-08T07:13:46Z</dc:date>
    </item>
    <item>
      <title>Re: NEED HELP : Calculated Column refreshes rather slowly and occasionally experiences memory problems.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/NEED-HELP-Calculated-Column-refreshes-rather-slowly-and/m-p/2692162#M81102</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="237066" data-lia-user-login="Venkateswara_ra" class="lia-mention lia-mention-user"&gt;Venkateswara_ra&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please try this:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;calculated column =
VAR ID = Case[Id]
VAR Type = Case[Type]
VAR CreationDate = Case[Creation Date]
VAR LastModified = Case[Last Modified On Date]
VAR FNOL =
    LOOKUPVALUE ( 'Header'[Reported Date], 'Header'[id], ID )
RETURN
    SWITCH (
        TRUE (),
        Type = "Present",
            CALCULATE (
                SUM ( Date[Work] ),
                Date[Date] &amp;gt;= FNOL
                    &amp;amp;&amp;amp; Date[Date] &amp;lt;= LastModified
            ),
        NOT Type IN { "Absent", "Leave" }, BLANK (),
        CALCULATE (
            SUM ( Date[Work] ),
            Date[Date] &amp;gt;= CreationDate
                &amp;amp;&amp;amp; Date[Date] &amp;lt;= LastModified
        )
    )&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Best Regards,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;changqing&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 10 Aug 2022 10:15:18 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/NEED-HELP-Calculated-Column-refreshes-rather-slowly-and/m-p/2692162#M81102</guid>
      <dc:creator>changqing</dc:creator>
      <dc:date>2022-08-10T10:15:18Z</dc:date>
    </item>
  </channel>
</rss>

