<?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 create a new column based on the conditions of the other columns? in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-create-a-new-column-based-on-the-conditions-of-the-other/m-p/2977863#M99750</link>
    <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="486290" data-lia-user-login="catpoisoncat" class="lia-mention lia-mention-user"&gt;catpoisoncat&lt;/a&gt; , You can use Switch to create new column &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;column 5 = Switch(True() ,&lt;/P&gt;
&lt;P&gt;[Column4] = "SCA", [Column1]&lt;/P&gt;
&lt;P&gt;[Column4] ="OYU",[Column3],&lt;/P&gt;
&lt;P&gt;[Column 2])&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Switch-Case statement of #PowerBI: &lt;A href="https://www.youtube.com/watch?v=gelJWktlR80&amp;amp;list=PLPaNVDMhUXGaaqV92SBD5X2hk3TMNlHhb&amp;amp;index=56" target="_blank"&gt;https://www.youtube.com/watch?v=gelJWktlR80&amp;amp;list=PLPaNVDMhUXGaaqV92SBD5X2hk3TMNlHhb&amp;amp;index=56&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 20 Dec 2022 03:03:10 GMT</pubDate>
    <dc:creator>amitchandak</dc:creator>
    <dc:date>2022-12-20T03:03:10Z</dc:date>
    <item>
      <title>How to create a new column based on the conditions of the other columns?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-create-a-new-column-based-on-the-conditions-of-the-other/m-p/2977858#M99749</link>
      <description>&lt;P&gt;Hi guys,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am new to Power BI, and come across this situation that I need to create a new column based on conditions of the other 4 columns. I've pasted screenshot of what the columns like down below with my further exaplanaiton.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;As you can see 4 columns here and I marked then with different colours and with numbers as well.&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;Here is the condition from SQL server.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Bascially, I need to generate a new column (column 5) based on the conditions show in SQL. The conditions in SQL is saying if column 4 cell equals to SCA, then the new column 5 cell should use the value from column 1, and if the column 4 cell equals to OYU, then the new column 5 cell should use the value from column 3, and if the column 4 cell equals to neither SCA nor OYU, then use the the calue from column 2 for the new column 5. And after done all of that, column 1, 2 and 3 needs to be invisible.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So I was wondering if I can do this on Power BI?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advanced.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;</description>
      <pubDate>Tue, 20 Dec 2022 02:58:52 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-create-a-new-column-based-on-the-conditions-of-the-other/m-p/2977858#M99749</guid>
      <dc:creator>catpoisoncat</dc:creator>
      <dc:date>2022-12-20T02:58:52Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a new column based on the conditions of the other columns?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-create-a-new-column-based-on-the-conditions-of-the-other/m-p/2977863#M99750</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="486290" data-lia-user-login="catpoisoncat" class="lia-mention lia-mention-user"&gt;catpoisoncat&lt;/a&gt; , You can use Switch to create new column &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;column 5 = Switch(True() ,&lt;/P&gt;
&lt;P&gt;[Column4] = "SCA", [Column1]&lt;/P&gt;
&lt;P&gt;[Column4] ="OYU",[Column3],&lt;/P&gt;
&lt;P&gt;[Column 2])&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Switch-Case statement of #PowerBI: &lt;A href="https://www.youtube.com/watch?v=gelJWktlR80&amp;amp;list=PLPaNVDMhUXGaaqV92SBD5X2hk3TMNlHhb&amp;amp;index=56" target="_blank"&gt;https://www.youtube.com/watch?v=gelJWktlR80&amp;amp;list=PLPaNVDMhUXGaaqV92SBD5X2hk3TMNlHhb&amp;amp;index=56&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 20 Dec 2022 03:03:10 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-create-a-new-column-based-on-the-conditions-of-the-other/m-p/2977863#M99750</guid>
      <dc:creator>amitchandak</dc:creator>
      <dc:date>2022-12-20T03:03:10Z</dc:date>
    </item>
  </channel>
</rss>

