<?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: How to write this IF statement for same date, but different statuses? in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-write-this-IF-statement-for-same-date-but-different/m-p/5143046#M187571</link>
    <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="1313106" data-lia-user-login="Help_me" class="lia-mention lia-mention-user"&gt;Help_me&lt;/a&gt;&amp;nbsp;I am assuming it is for a calculated column. Please try out the below dax to create the &lt;STRONG&gt;Eat Flag&lt;/STRONG&gt; Column&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Eat Flag Column = VAR CurrentDate = 'Table'[Baked_Date]

VAR HasChewy =
    CALCULATE (
        COUNTROWS ( 'Table' ),
        'Table'[Baked_Date] = CurrentDate,
        'Table'[Cookie Type] = "Chewy"
    )

VAR HasChunky =
    CALCULATE (
        COUNTROWS ( 'Table' ),
        'Table'[Baked_Date] = CurrentDate,
        'Table'[Cookie Type] = "Chunky"
    )

RETURN
IF ( HasChewy &amp;gt; 0 &amp;amp;&amp;amp; HasChunky &amp;gt; 0, "Eat", "Do not eat" )&lt;/LI-CODE&gt;</description>
    <pubDate>Thu, 02 Apr 2026 12:15:45 GMT</pubDate>
    <dc:creator>Jai-Rathinavel</dc:creator>
    <dc:date>2026-04-02T12:15:45Z</dc:date>
    <item>
      <title>How to write this IF statement for same date, but different statuses?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-write-this-IF-statement-for-same-date-but-different/m-p/5140231#M187524</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I have the two columns below in the same table. "Cookie Type" is text field and "Baked_Date" is a date value.&lt;BR /&gt;How can I write the IF statement in DAX for the concept: If the same baked_date for Cookie_type "Chewy" and "Chunky", then "Eat", otherwise "do not eat". I added the "Grape" value to show that there are other values in the dataset that are not relevant.&amp;nbsp;&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;EM&gt;Cookie Type&lt;/EM&gt;&lt;/TD&gt;&lt;TD&gt;&lt;EM&gt;Baked_Date&lt;/EM&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Chewy&lt;/TD&gt;&lt;TD&gt;03/27&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Grape&lt;/TD&gt;&lt;TD&gt;03/27&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Chunky&lt;/TD&gt;&lt;TD&gt;03/27&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;</description>
      <pubDate>Fri, 27 Mar 2026 19:06:52 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-write-this-IF-statement-for-same-date-but-different/m-p/5140231#M187524</guid>
      <dc:creator>Help_me</dc:creator>
      <dc:date>2026-03-27T19:06:52Z</dc:date>
    </item>
    <item>
      <title>Re: How to write this IF statement for same date, but different statuses?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-write-this-IF-statement-for-same-date-but-different/m-p/5140265#M187525</link>
      <description>&lt;LI-CODE lang="markup"&gt;How can I write the IF statement in DAX&lt;/LI-CODE&gt;
&lt;P&gt;write to where?&amp;nbsp; A calculated column? A measure?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please provide sample data that covers your issue or question &lt;STRONG&gt;completely&lt;/STRONG&gt;, in a &lt;STRONG&gt;usable&lt;/STRONG&gt; format (not as a screenshot).&lt;BR /&gt;Do not include sensitive information. Do not include anything that is unrelated to the issue or question. &lt;BR /&gt;Please show the expected outcome based on the sample data you provided. &lt;BR /&gt;&lt;BR /&gt;Need help uploading data? &lt;A href="https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-p/963216" target="_blank"&gt;https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-p/963216&lt;/A&gt; &lt;BR /&gt;Want faster answers? &lt;A href="https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523" target="_blank"&gt;https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 27 Mar 2026 20:05:04 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-write-this-IF-statement-for-same-date-but-different/m-p/5140265#M187525</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2026-03-27T20:05:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to write this IF statement for same date, but different statuses?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-write-this-IF-statement-for-same-date-but-different/m-p/5140377#M187526</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="1313106" data-lia-user-login="Help_me" class="lia-mention lia-mention-user"&gt;Help_me&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;please provide more sample rows and clarify what&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="100342" data-lia-user-login="lbendlin" class="lia-mention lia-mention-user"&gt;lbendlin&lt;/a&gt;&amp;nbsp;asked: do you need to create a column in the table or a measure for a visual?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If this helped, please consider giving kudos and mark as a solution&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;@me in replies or I'll lose your thread&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;Want to check your DAX skills? &lt;A href="https://www.linkedin.com/company/kubisco/" target="_blank"&gt;Answer my biweekly DAX challenges on the kubisco Linkedin page&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Consider voting &lt;A href="https://community.fabric.microsoft.com/t5/Fabric-Ideas/Power-BI-Filter-Pane-as-an-icon-on-the-right-side-bar-in-on/idi-p/4728588" target="_blank"&gt;this Power BI idea&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Francesco Bergamaschi&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;MBA, M.Eng, M.Econ, Professor of BI&lt;/P&gt;</description>
      <pubDate>Sat, 28 Mar 2026 10:14:16 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-write-this-IF-statement-for-same-date-but-different/m-p/5140377#M187526</guid>
      <dc:creator>FBergamaschi</dc:creator>
      <dc:date>2026-03-28T10:14:16Z</dc:date>
    </item>
    <item>
      <title>Re: How to write this IF statement for same date, but different statuses?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-write-this-IF-statement-for-same-date-but-different/m-p/5141150#M187541</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="1313106" data-lia-user-login="Help_me" class="lia-mention lia-mention-user"&gt;Help_me&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Calculated column:&lt;/P&gt;
&lt;PRE&gt;Eat Flag = &lt;BR /&gt;VAR CurrentDate = 'Table'[Baked_Date]&lt;BR /&gt;RETURN&lt;BR /&gt;IF(&lt;BR /&gt;CALCULATE(&lt;BR /&gt;COUNTROWS('Table'),&lt;BR /&gt;'Table'[Baked_Date] = CurrentDate,&lt;BR /&gt;'Table'[Cookie Type] IN {"Chewy", "Chunky"}&lt;BR /&gt;) = 2,&lt;BR /&gt;"Eat",&lt;BR /&gt;"Do not eat"&lt;BR /&gt;)&lt;/PRE&gt;
&lt;P&gt;Checks if both Chewy + Chunky exist on same Baked_Date.&lt;/P&gt;</description>
      <pubDate>Mon, 30 Mar 2026 13:04:45 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-write-this-IF-statement-for-same-date-but-different/m-p/5141150#M187541</guid>
      <dc:creator>Kedar_Pande</dc:creator>
      <dc:date>2026-03-30T13:04:45Z</dc:date>
    </item>
    <item>
      <title>Re: How to write this IF statement for same date, but different statuses?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-write-this-IF-statement-for-same-date-but-different/m-p/5141824#M187548</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="1313106" data-lia-user-login="Help_me" class="lia-mention lia-mention-user"&gt;Help_me&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Thank you for reaching out to Microsoft Fabric Community.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Thank you&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="100342" data-lia-user-login="lbendlin" class="lia-mention lia-mention-user"&gt;lbendlin&lt;/a&gt;,&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="1287762" data-lia-user-login="FBergamaschi" class="lia-mention lia-mention-user"&gt;FBergamaschi&lt;/a&gt; and&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="568855" data-lia-user-login="Kedar_Pande" class="lia-mention lia-mention-user"&gt;Kedar_Pande&lt;/a&gt;&amp;nbsp;for the prompt response.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;As we haven’t heard back from you, we wanted to kindly follow up to&amp;nbsp;check if the solution provided by the user's for the issue worked?&amp;nbsp;or let us know if you need any further assistance.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks and regards,&lt;/P&gt;
&lt;P&gt;Anjan Kumar Chippa&lt;/P&gt;</description>
      <pubDate>Tue, 31 Mar 2026 11:44:20 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-write-this-IF-statement-for-same-date-but-different/m-p/5141824#M187548</guid>
      <dc:creator>v-achippa</dc:creator>
      <dc:date>2026-03-31T11:44:20Z</dc:date>
    </item>
    <item>
      <title>Re: How to write this IF statement for same date, but different statuses?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-write-this-IF-statement-for-same-date-but-different/m-p/5143046#M187571</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="1313106" data-lia-user-login="Help_me" class="lia-mention lia-mention-user"&gt;Help_me&lt;/a&gt;&amp;nbsp;I am assuming it is for a calculated column. Please try out the below dax to create the &lt;STRONG&gt;Eat Flag&lt;/STRONG&gt; Column&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Eat Flag Column = VAR CurrentDate = 'Table'[Baked_Date]

VAR HasChewy =
    CALCULATE (
        COUNTROWS ( 'Table' ),
        'Table'[Baked_Date] = CurrentDate,
        'Table'[Cookie Type] = "Chewy"
    )

VAR HasChunky =
    CALCULATE (
        COUNTROWS ( 'Table' ),
        'Table'[Baked_Date] = CurrentDate,
        'Table'[Cookie Type] = "Chunky"
    )

RETURN
IF ( HasChewy &amp;gt; 0 &amp;amp;&amp;amp; HasChunky &amp;gt; 0, "Eat", "Do not eat" )&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 02 Apr 2026 12:15:45 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-write-this-IF-statement-for-same-date-but-different/m-p/5143046#M187571</guid>
      <dc:creator>Jai-Rathinavel</dc:creator>
      <dc:date>2026-04-02T12:15:45Z</dc:date>
    </item>
    <item>
      <title>Re: How to write this IF statement for same date, but different statuses?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-write-this-IF-statement-for-same-date-but-different/m-p/5143964#M187616</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;A href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/1313106" target="_blank"&gt;@Help_me&lt;/A&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;We wanted to kindly follow up to&amp;nbsp;check if the solution provided by the user's for the issue worked?&amp;nbsp;or let us know if you need any further assistance.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks and regards,&lt;/P&gt;
&lt;P&gt;Anjan Kumar Chippa&lt;/P&gt;</description>
      <pubDate>Mon, 06 Apr 2026 06:02:16 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-write-this-IF-statement-for-same-date-but-different/m-p/5143964#M187616</guid>
      <dc:creator>v-achippa</dc:creator>
      <dc:date>2026-04-06T06:02:16Z</dc:date>
    </item>
  </channel>
</rss>

