<?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 Creating a new column that is conditional to another column. in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Creating-a-new-column-that-is-conditional-to-another-column/m-p/3284472#M122080</link>
    <description>&lt;P&gt;I am trying to create a new column named "ROFO DATE" and I need the dates to be the begining of the Qtr. But this date will depend on two conditions/columns. SCENARIO and Data Genearted Date&lt;/P&gt;&lt;P&gt;SCENARIO column has data like ROFO1 , ROFO2, ROFO3, ROFO4, PYROFO1, etc.... ROFO1 means QTR 1.&amp;nbsp;&lt;/P&gt;&lt;P&gt;if the Data was generated in Qtr 1 of 2023 the the ROFO1 = Qtr 1 of 2022.&amp;nbsp;&lt;/P&gt;&lt;P&gt;But if the data was generated in Qtr 2 of 2023 then ROFO1 = Qtr 1 og 2023.&lt;/P&gt;</description>
    <pubDate>Wed, 14 Jun 2023 20:15:44 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2023-06-14T20:15:44Z</dc:date>
    <item>
      <title>Creating a new column that is conditional to another column.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Creating-a-new-column-that-is-conditional-to-another-column/m-p/3284472#M122080</link>
      <description>&lt;P&gt;I am trying to create a new column named "ROFO DATE" and I need the dates to be the begining of the Qtr. But this date will depend on two conditions/columns. SCENARIO and Data Genearted Date&lt;/P&gt;&lt;P&gt;SCENARIO column has data like ROFO1 , ROFO2, ROFO3, ROFO4, PYROFO1, etc.... ROFO1 means QTR 1.&amp;nbsp;&lt;/P&gt;&lt;P&gt;if the Data was generated in Qtr 1 of 2023 the the ROFO1 = Qtr 1 of 2022.&amp;nbsp;&lt;/P&gt;&lt;P&gt;But if the data was generated in Qtr 2 of 2023 then ROFO1 = Qtr 1 og 2023.&lt;/P&gt;</description>
      <pubDate>Wed, 14 Jun 2023 20:15:44 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Creating-a-new-column-that-is-conditional-to-another-column/m-p/3284472#M122080</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-06-14T20:15:44Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a new column that is conditional to another column.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Creating-a-new-column-that-is-conditional-to-another-column/m-p/3287390#M122258</link>
      <description>&lt;P&gt;Hi&amp;nbsp; Anonymous&lt;/LI-USER&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It's not clear how the latest date you said is reflected, I'm creating the data here&lt;/P&gt;
&lt;P&gt;A rule is customized:&lt;/P&gt;
&lt;P&gt;The latest date is the maximum date for another table&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here are the steps you can follow：&lt;/P&gt;
&lt;P&gt;1. Create calculated column.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Column =
var _maxdate=
MAXX(ALL(Table2),'Table2'[Date])
return
IF(
    YEAR(_maxdate) = YEAR(TODAY())&amp;amp;&amp;amp; QUARTER(_maxdate) =1,
     "Qtr"&amp;amp;" "&amp;amp;RIGHT('Table'[Column1],1)&amp;amp;" "&amp;amp; "of" &amp;amp;" "&amp;amp; YEAR(TODAY())-1,
"Qtr"&amp;amp;" "&amp;amp;RIGHT('Table'[Column1],1)&amp;amp;" "&amp;amp; " og " &amp;amp;" "&amp;amp; YEAR(TODAY()))&lt;/LI-CODE&gt;
&lt;P&gt;2. Result:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Liu Yang&lt;/P&gt;
&lt;P&gt;If this post &lt;STRONG&gt;helps&lt;/STRONG&gt;, then please consider &lt;EM&gt;Accept it as the solution&lt;/EM&gt; to help the other members find it more quickly&lt;/P&gt;</description>
      <pubDate>Fri, 16 Jun 2023 07:15:00 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Creating-a-new-column-that-is-conditional-to-another-column/m-p/3287390#M122258</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-06-16T07:15:00Z</dc:date>
    </item>
  </channel>
</rss>

