<?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: If Condition Performance Issues in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/If-Condition-Performance-Issues/m-p/3794393#M148274</link>
    <description>&lt;P&gt;I had same thing but report fails. Even I added dates manually like 12/1/2023 and 3/26/2023, .. But report fails after running for some time. unbale to figure out where the performance issue is. Or an alternative for IF which is better performing.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 27 Mar 2024 13:54:18 GMT</pubDate>
    <dc:creator>rajk</dc:creator>
    <dc:date>2024-03-27T13:54:18Z</dc:date>
    <item>
      <title>If Condition Performance Issues</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/If-Condition-Performance-Issues/m-p/3783504#M147784</link>
      <description>&lt;P&gt;I had to use a filter with IF condition. It is not performing and report fails. With out the filter the report runs fine.&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Filter =&lt;/SPAN&gt; &lt;SPAN&gt;if&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;and&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;SELECTEDVALUE&lt;/SPAN&gt;&lt;SPAN&gt;('Table [Column]&lt;/SPAN&gt;&lt;SPAN&gt;)&amp;gt;=&lt;/SPAN&gt;&lt;SPAN&gt;DATE&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;YEAR&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;TODAY&lt;/SPAN&gt;&lt;SPAN&gt;()), &lt;/SPAN&gt;&lt;SPAN&gt;MONTH&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;TODAY&lt;/SPAN&gt;&lt;SPAN&gt;())-&lt;/SPAN&gt;&lt;SPAN&gt;3&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;1&lt;/SPAN&gt;&lt;SPAN&gt;) &amp;nbsp;, &lt;/SPAN&gt;&lt;SPAN&gt;SELECTEDVALUE&lt;/SPAN&gt;&lt;SPAN&gt;('Table [Column]&lt;/SPAN&gt;&lt;SPAN&gt;)&amp;lt;=&lt;/SPAN&gt;&lt;SPAN&gt;TODAY&lt;/SPAN&gt;&lt;SPAN&gt;()-&lt;/SPAN&gt;&lt;SPAN&gt;1&lt;/SPAN&gt;&lt;SPAN&gt;),&lt;/SPAN&gt;&lt;SPAN&gt;"Yes"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;"No"&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Basically We wanted last three months and day 1 of the month and Yesterday dynamically.&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;If we look at today it would be 12/1/2023 - 3/20/2024.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Any Help please..!&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 21 Mar 2024 15:16:39 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/If-Condition-Performance-Issues/m-p/3783504#M147784</guid>
      <dc:creator>rajk</dc:creator>
      <dc:date>2024-03-21T15:16:39Z</dc:date>
    </item>
    <item>
      <title>Re: If Condition Performance Issues</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/If-Condition-Performance-Issues/m-p/3783696#M147791</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="607499" data-lia-user-login="rajk" class="lia-mention lia-mention-user"&gt;rajk&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Would a measure like this help?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Filter = 
    IF(
        SELECTEDVALUE( 'Sheet1'[Date] ) &amp;gt;= EOMONTH( TODAY(), - 4 ) + 1
            &amp;amp;&amp;amp; SELECTEDVALUE( 'Sheet1'[Date] ) &amp;lt;= TODAY() - 1,
        "Yes",
        "No"
    )&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Let me know if you have any questions.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://1drv.ms/u/s!AnF6rI36HAVkhYV-fYO2K7RLX5DNVg?e=92Lod4" target="_blank"&gt;test IF perf.pbix&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 21 Mar 2024 16:56:04 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/If-Condition-Performance-Issues/m-p/3783696#M147791</guid>
      <dc:creator>gmsamborn</dc:creator>
      <dc:date>2024-03-21T16:56:04Z</dc:date>
    </item>
    <item>
      <title>Re: If Condition Performance Issues</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/If-Condition-Performance-Issues/m-p/3788379#M148016</link>
      <description>&lt;P style="margin: 0in; font-family: tahoma; font-size: 11.0pt;"&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="607499" data-lia-user-login="rajk" class="lia-mention lia-mention-user"&gt;rajk&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P style="margin: 0in; font-family: tahoma; font-size: 11.0pt;"&gt;Did the above suggestions help with your scenario? if that is the case, you can consider Kudo or Accept the helpful suggestions to help others who faced similar requirements.&lt;/P&gt;
&lt;P style="margin: 0in; font-family: tahoma; font-size: 11.0pt;"&gt;If these also don't help, please share more detailed information and description to help us clarify your scenario to test.&lt;/P&gt;
&lt;P style="margin: 0in; font-family: tahoma; font-size: 11.0pt;"&gt;&lt;A href="http://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490" target="_blank"&gt;How to Get Your Question Answered Quickly&amp;nbsp;&lt;/A&gt;&lt;/P&gt;
&lt;P style="margin: 0in; font-family: tahoma; font-size: 11.0pt;"&gt;Regards,&lt;/P&gt;
&lt;P style="margin: 0in; font-family: tahoma; font-size: 11.0pt;"&gt;Xiaoxin Sheng&lt;/P&gt;</description>
      <pubDate>Mon, 25 Mar 2024 02:00:28 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/If-Condition-Performance-Issues/m-p/3788379#M148016</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-03-25T02:00:28Z</dc:date>
    </item>
    <item>
      <title>Re: If Condition Performance Issues</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/If-Condition-Performance-Issues/m-p/3794393#M148274</link>
      <description>&lt;P&gt;I had same thing but report fails. Even I added dates manually like 12/1/2023 and 3/26/2023, .. But report fails after running for some time. unbale to figure out where the performance issue is. Or an alternative for IF which is better performing.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 27 Mar 2024 13:54:18 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/If-Condition-Performance-Issues/m-p/3794393#M148274</guid>
      <dc:creator>rajk</dc:creator>
      <dc:date>2024-03-27T13:54:18Z</dc:date>
    </item>
    <item>
      <title>Re: If Condition Performance Issues</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/If-Condition-Performance-Issues/m-p/3794399#M148275</link>
      <description>&lt;P&gt;We are on Fabric with schematic model.&lt;/P&gt;</description>
      <pubDate>Wed, 27 Mar 2024 13:55:32 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/If-Condition-Performance-Issues/m-p/3794399#M148275</guid>
      <dc:creator>rajk</dc:creator>
      <dc:date>2024-03-27T13:55:32Z</dc:date>
    </item>
    <item>
      <title>Re: If Condition Performance Issues</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/If-Condition-Performance-Issues/m-p/3795774#M148354</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="607499" data-lia-user-login="rajk" class="lia-mention lia-mention-user"&gt;rajk&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;Perhaps you can try to use IN operator to check if the current date are included in specific ranges:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;formula =
VAR currDate =
    MAX ( 'Table1'[Column] )
VAR _range =
    CALENDAR ( DATE ( YEAR ( TODAY () ), MONTH ( TODAY () ) - 3, 1 ), TODAY () - 1 )
RETURN
    IF ( currDate IN _range, "Yes", "No" )&lt;/LI-CODE&gt;
&lt;P&gt;&lt;A href="https://www.sqlbi.com/articles/the-in-operator-in-dax/" target="_blank"&gt;The IN operator in DAX - SQLBI&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;If the aboe not help, can you please share a pbix or some dummy data that keep the raw data structure with expected results? It should help us clarify your scenario and test to coding formula.&lt;/P&gt;
&lt;P&gt;&lt;A href="http://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490" target="_blank"&gt;How to Get Your Question Answered Quickly&amp;nbsp;&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;BR /&gt;Xiaoxin Sheng&lt;/P&gt;</description>
      <pubDate>Thu, 28 Mar 2024 06:34:15 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/If-Condition-Performance-Issues/m-p/3795774#M148354</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-03-28T06:34:15Z</dc:date>
    </item>
  </channel>
</rss>

